mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 12:18:59 +00:00
Documentation fixes for opus bindings.
This commit is contained in:
parent
6217076cbf
commit
9deb7796a5
@ -80,25 +80,33 @@ def load_opus(name):
|
|||||||
"""Loads the libopus shared library for use with voice.
|
"""Loads the libopus shared library for use with voice.
|
||||||
|
|
||||||
If this function is not called then the library uses the function
|
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.
|
Not loading a library leads to voice not working.
|
||||||
|
|
||||||
This function propagates the exceptions thrown.
|
This function propagates the exceptions thrown.
|
||||||
|
|
||||||
.. warning::
|
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.
|
||||||
|
|
||||||
The bitness of the library must match the bitness of your python
|
Note
|
||||||
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
|
On Windows, the .dll extension is not necessary. However, on Linux
|
||||||
the load will throw an exception.
|
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.
|
||||||
|
|
||||||
.. note::
|
Parameters
|
||||||
|
----------
|
||||||
On Windows, the .dll extension is not necessary. However, on Linux
|
name: str
|
||||||
the full extension is required to load the library, e.g. ``libopus.so.1``.
|
The filename of the shared library.
|
||||||
|
|
||||||
:param name: The filename of the shared library.
|
|
||||||
"""
|
"""
|
||||||
global _lib
|
global _lib
|
||||||
_lib = libopus_loader(name)
|
_lib = libopus_loader(name)
|
||||||
|
@ -457,3 +457,4 @@ The following exceptions are thrown by the library.
|
|||||||
|
|
||||||
.. autoexception:: GatewayNotFound
|
.. autoexception:: GatewayNotFound
|
||||||
|
|
||||||
|
.. autoexception:: OpusError
|
||||||
|
Loading…
x
Reference in New Issue
Block a user