Improve documentation

This commit is contained in:
NCPlayz
2019-05-18 06:04:54 -04:00
committed by Rapptz
parent 2f05436653
commit 3c9bcc2851
48 changed files with 652 additions and 569 deletions

View File

@ -76,10 +76,7 @@ class AudioSource:
raise NotImplementedError
def is_opus(self):
"""Checks if the audio source is already encoded in Opus.
Defaults to ``False``.
"""
"""Checks if the audio source is already encoded in Opus."""
return False
def cleanup(self):
@ -98,7 +95,7 @@ class PCMAudio(AudioSource):
Attributes
-----------
stream: file-like object
stream: :term:`py:file object`
A file-like object that reads byte data representing raw PCM.
"""
def __init__(self, stream):
@ -122,16 +119,16 @@ class FFmpegPCMAudio(AudioSource):
Parameters
------------
source: Union[:class:`str`, BinaryIO]
source: Union[:class:`str`, :class:`io.BufferedIOBase`]
The input that ffmpeg will take and convert to PCM bytes.
If ``pipe`` is True then this is a file-like object that is
passed to the stdin of ffmpeg.
executable: :class:`str`
The executable name (and path) to use. Defaults to ``ffmpeg``.
pipe: :class:`bool`
If true, denotes that ``source`` parameter will be passed
If ``True``, denotes that ``source`` parameter will be passed
to the stdin of ffmpeg. Defaults to ``False``.
stderr: Optional[BinaryIO]
stderr: Optional[:term:`py:file object`]
A file-like object to pass to the Popen constructor.
Could also be an instance of ``subprocess.PIPE``.
options: Optional[:class:`str`]
@ -203,7 +200,7 @@ class PCMVolumeTransformer(AudioSource):
------------
original: :class:`AudioSource`
The original AudioSource to transform.
volume: float
volume: :class:`float`
The initial volume to set it to.
See :attr:`volume` for more info.