diff options
| author | NCPlayz <[email protected]> | 2019-05-18 06:04:54 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2019-06-07 19:27:46 -0400 |
| commit | 3c9bcc285147154a2980f6e661efdfa676672b6a (patch) | |
| tree | 657bafa75e4e0d45361e394443ea932ad70e86a7 /discord/opus.py | |
| parent | Added comment for/redo system information (diff) | |
| download | discord.py-3c9bcc285147154a2980f6e661efdfa676672b6a.tar.xz discord.py-3c9bcc285147154a2980f6e661efdfa676672b6a.zip | |
Improve documentation
Diffstat (limited to 'discord/opus.py')
| -rw-r--r-- | discord/opus.py | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/discord/opus.py b/discord/opus.py index c37be248..70ed8056 100644 --- a/discord/opus.py +++ b/discord/opus.py @@ -115,21 +115,13 @@ def load_opus(name): """Loads the libopus shared library for use with voice. If this function is not called then the library uses the function - `ctypes.util.find_library`__ and then loads that one + :func:`ctypes.util.find_library` and then loads that one if available. - .. _find library: https://docs.python.org/3.5/library/ctypes.html#finding-shared-libraries - __ `find library`_ - Not loading a library leads to voice not working. This function propagates the exceptions thrown. - .. note:: - - On Windows, this function should not need to be called as the binaries - are automatically loaded. - .. warning:: The bitness of the library must match the bitness of your python @@ -139,9 +131,14 @@ def load_opus(name): .. note:: + On Windows, this function should not need to be called as the binaries + are automatically loaded. + + .. note:: + On Windows, the .dll extension is not necessary. However, on Linux the full extension is required to load the library, e.g. ``libopus.so.1``. - On Linux however, `find library`_ will usually find the library automatically + On Linux however, :func:`ctypes.util.find_library` will usually find the library automatically without you having to call this. Parameters @@ -154,7 +151,7 @@ def load_opus(name): def is_loaded(): """Function to check if opus lib is successfully loaded either - via the ``ctypes.util.find_library`` call of :func:`load_opus`. + via the :func:`ctypes.util.find_library` call of :func:`load_opus`. This must return ``True`` for voice to work. |