#[non_exhaustive]pub enum AudioCodec {
Aac,
Opus,
}Expand description
A compressed audio codec.
AAC travels in a packet envelope; Opus is sent as bare codec packets.
§Delivery
The SDK takes any compressed audio frame and silently discards the ones whose parameters it does not accept, so this module refuses to build or send those:
- Opus runs at 8, 12, 16, 24 or 48 kHz, and a frame holds 2.5, 5, 10, 20, 40 or 60 ms of audio.
- An AAC frame holds 1024 samples per channel and carries its AudioSpecificConfig as codec configuration data. The sample rate and the channel layout the configuration names must be the frame’s own, which allows the thirteen indexed sample rates from 7350 Hz to 96 kHz and one to six or eight channels.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Trait Implementations§
Source§impl Clone for AudioCodec
impl Clone for AudioCodec
impl Copy for AudioCodec
Source§impl Debug for AudioCodec
impl Debug for AudioCodec
impl Eq for AudioCodec
Source§impl Hash for AudioCodec
impl Hash for AudioCodec
Source§impl PartialEq for AudioCodec
impl PartialEq for AudioCodec
impl StructuralPartialEq for AudioCodec
Auto Trait Implementations§
impl Freeze for AudioCodec
impl RefUnwindSafe for AudioCodec
impl Send for AudioCodec
impl Sync for AudioCodec
impl Unpin for AudioCodec
impl UnsafeUnpin for AudioCodec
impl UnwindSafe for AudioCodec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more