| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Closes #2510
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rework FFmpeg player and add FFmpegOpusAudio
I have extracted some of the base FFmpeg source code into its own
base class and reimplemented the PCM and the new Opus variants.
Support avconv probing
Also fix a few things
Update `__all__`
Fix the bugs
Rework probe functions and add factory function
Probing involves subprocess so it has been reworked into an async
factory function.
Add docs + a few tweaks
* Removed unnecessary read() and is_opus() functions from FFmpegAudio
* Clear self._stdout in cleanup()
* Add 20 second process communication timeout to probe functions
* Capped probe function bitrate values at 512
Change AudioPlayer to use more accurate, monotonic time.perf_counter()
Add lazy opus loading
The library now no longer loads libopus on import, only on
opus.Encoder creation or manually.
Fix review nits
|
| |
|
| |
Any higher is useless for opus anyways.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Reorder imports to be consistenly grouped by standard library, third
party library, and local modules in that order thoughout the library.
|
| |
|
|
|
| |
Convert log("fmt" % args) to log("fmt", args) as the latter is lazy and
does not do the formating if the string is never logged.
|
| |
|
|
|
|
| |
Use bare raise statement when reraising the exception that occured, and
remove unused exception variables. Also remove a pointless exception
handler in discord.opus.
|
| |
|
| |
Fixes #1056
|
| | |
|
| | |
|
| |
|
|
|
| |
This would cause unnecessary format calls even if you didn't have
logging enabled.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a complete redesign of the old voice code.
A list of major changes is as follows:
* The voice websocket will now automatically reconnect with
exponential back-off just like the regular Client does.
* Removal of the stream player concept.
* Audio now gracefully pauses and resumes when a disconnect is found.
* Introduce a discord.AudioSource concept to abstract streams
* Flatten previous stream player functionality with the
VoiceClient, e.g. player.stop() is now voice_client.stop()
* With the above re-coupling this means you no longer have to
store players anywhere.
* The after function now requires a single parameter, the error,
if any existed. This will typically be None.
A lot of this design is experimental.
|
| | |
|
| | |
|
| | |
|
| |
|
| |
Enable forward error correction + packet loss percent tuning in opus encoder. Additionally, use some sane defaults. This should fix people hearing robo in music when packet loss is happening.
|
| |
|
|
| |
Patch by Jake.
|
| | |
|
| | |
|
| | |
|
| | |
|
|
|
Currently you can only send from a stream that implements
``read`` and a ``ffmpeg`` or ``avconv``.
|