Receive: Config of decode sample rate/channels (#265)

* Receive: Config of decode sample rate/channels

This PR allows for dynamic configuration of the output sample rate and
channel count of received Opus audio. Users who rely on supported
formats should no longer need to manually resample & downmix audio
decoded from SSRCs in a call.

Opus exposes tuples of (Mono, Stereo) x (8, 12, 16, 24, 48)kHz.
Changing this at runtime (mid-call) may cause some audio glitches, as
decoder state must be reconstructed from scratch for all affected SSRCs.

* Fix doc typo, consistent naming with MixMode.
This commit is contained in:
Kyle Simpson
2024-11-16 11:57:52 +00:00
committed by GitHub
parent 312799d231
commit 91bf1538fc
6 changed files with 134 additions and 11 deletions

View File

@@ -28,7 +28,7 @@ use connection::error::{Error, Result};
pub use crypto::CryptoMode;
pub(crate) use crypto::CryptoState;
#[cfg(feature = "receive")]
pub use decode_mode::DecodeMode;
pub use decode_mode::*;
pub use mix_mode::MixMode;
pub use scheduler::{
Config as SchedulerConfig,