diff options
| author | Rapptz <[email protected]> | 2015-12-08 16:22:01 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2015-12-08 16:22:01 -0500 |
| commit | 9deb7796a584c4fecc7c275c9567f594c9da0f1f (patch) | |
| tree | 88349158504d5c0759b0f6d37aa9d3a8f06af997 /discord/opus.py | |
| parent | Fix exception handling having a NameError (diff) | |
| download | discord.py-9deb7796a584c4fecc7c275c9567f594c9da0f1f.tar.xz discord.py-9deb7796a584c4fecc7c275c9567f594c9da0f1f.zip | |
Documentation fixes for opus bindings.
Diffstat (limited to 'discord/opus.py')
| -rw-r--r-- | discord/opus.py | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/discord/opus.py b/discord/opus.py index a49d9341..68c6a3ec 100644 --- a/discord/opus.py +++ b/discord/opus.py @@ -80,25 +80,33 @@ 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 if available. + `ctypes.util.find_library <find_library>` and then loads that one + if available. + + .. find_library: https://docs.python.org/3.5/library/ctypes.html#finding-shared-libraries Not loading a library leads to voice not working. This function propagates the exceptions thrown. - .. warning:: - - The bitness of the library must match the bitness of your python - interpreter. If the library is 64-bit then your python interpreter - must be 64-bit as well. Usually if there's a mismatch in bitness then - the load will throw an exception. - - .. 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``. - - :param name: The filename of the shared library. + Warning + -------- + The bitness of the library must match the bitness of your python + interpreter. If the library is 64-bit then your python interpreter + must be 64-bit as well. Usually if there's a mismatch in bitness then + the load will throw an exception. + + 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 + without you having to call this. + + Parameters + ---------- + name: str + The filename of the shared library. """ global _lib _lib = libopus_loader(name) |