Expand description
Runner for a voice connection.
Songbird’s driver is a mixed-sync system, using:
- Asynchronous connection management, event-handling, and gateway integration.
- Synchronous audio mixing, packet generation, and encoding.
This splits up work according to its IO/compute bound nature, preventing packet generation from being slowed down past its deadline, or from affecting other asynchronous tasks your bot must handle.
Re-exports§
pub use audiopus as opus;
Modules§
- retry
- Configuration for connection retries.
Structs§
- Connect
- Future for a call to
Driver::connect
. - Decode
Config - Configuration for
DecodeMode::Decode
- Disposal
Thread - Driver
- The control object for a Discord voice connection, handling connection, mixing, encoding, en/decryption, and event generation.
- Live
Stat Block - Runtime statistics for an individual worker.
- Scheduler
- A reference to a shared group of threads used for running idle and active audio threads.
- Scheduler
Config - Configuration for how a
Scheduler
handles tasks.
Enums§
- Bitrate
- Opus encoder bitrate settings.
- Channels
- The channel layout of output audio when using
DecodeMode::Decode
. - Crypto
Mode - Encryption schemes supportd by Discord.
- Decode
Mode - Decode behaviour for received RTP packets within the driver.
- MixMode
- Mixing behaviour for sent audio sources processed within the driver.
- Sample
Rate - The sample rate of output audio when using
DecodeMode::Decode
. - Scheduler
Error - Errors encountered when communicating with the internals of a
Scheduler
. - Scheduler
Mode - Strategies for mapping live mixer tasks to individual threads.
Functions§
- get_
default_ scheduler - The default shared scheduler instance.