#[non_exhaustive]pub struct Settings {
pub codec: Codec,
pub sample_rate: u32,
pub layout: Layout,
pub bitrate: Option<Rate>,
pub dtx: bool,
pub frame_duration: Duration,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.codec: CodecOutput codec. Defaults to Codec::Opus.
sample_rate: u32Sample rate accepted by the codec.
layout: LayoutLayout accepted by the codec.
bitrate: Option<Rate>Bitrate in bits per second. None lets Opus pick. PCM requires None
because its bitrate is fixed by the sample rate and channel count.
Rates too low for Opus to code anything at the chosen
frame_duration are rejected. The floor is 1200
bps at the default 20 ms, rises for shorter frames, and is 2400 bps for
frames of 10 ms and longer.
dtx: boolEnable Opus discontinuous transmission during silence.
frame_duration: DurationEncoded frame duration. Opus accepts 2.5 / 5 / 10 / 20 / 40 / 60 ms. PCM accepts any duration containing a whole number of samples.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Settings
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnsafeUnpin for Settings
impl UnwindSafe for Settings
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