pub struct AudioSettingsBuilder { /* private fields */ }Expand description
Builder for configuring audio encoder settings.
Implementations§
Source§impl AudioSettingsBuilder
impl AudioSettingsBuilder
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Constructs a new AudioSettingsBuilder with common defaults.
Defaults:
- Bitrate: 192 kbps
- Channels: 2
- Sample rate: 48 kHz
- Bits per sample: 16
- Subtype:
AudioSettingsSubType::AAC - Disabled: false
Sourcepub const fn channel_count(self, channel_count: u32) -> Self
pub const fn channel_count(self, channel_count: u32) -> Self
Sets number of interleaved channels.
Sourcepub const fn sample_rate(self, sample_rate: u32) -> Self
pub const fn sample_rate(self, sample_rate: u32) -> Self
Sets sample rate in Hz.
Sourcepub const fn bit_per_sample(self, bit_per_sample: u32) -> Self
pub const fn bit_per_sample(self, bit_per_sample: u32) -> Self
Sets bits per sample.
Sourcepub const fn sub_type(self, sub_type: AudioSettingsSubType) -> Self
pub const fn sub_type(self, sub_type: AudioSettingsSubType) -> Self
Sets audio codec/subtype (e.g., AudioSettingsSubType::AAC).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AudioSettingsBuilder
impl RefUnwindSafe for AudioSettingsBuilder
impl Send for AudioSettingsBuilder
impl Sync for AudioSettingsBuilder
impl Unpin for AudioSettingsBuilder
impl UnsafeUnpin for AudioSettingsBuilder
impl UnwindSafe for AudioSettingsBuilder
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more