pub struct AudioConfig {
pub sample_rate: u32,
pub frame_duration_ms: u32,
pub channels: u16,
pub bitrate: u32,
}Fields§
§sample_rate: u32Sample rate in Hz.
frame_duration_ms: u32Frame duration in milliseconds.
channels: u16Channel count (mono/stereo).
bitrate: u32Target bitrate for Opus.
Implementations§
Source§impl AudioConfig
impl AudioConfig
Sourcepub fn frame_samples(&self) -> usize
pub fn frame_samples(&self) -> usize
Number of samples per frame (all channels included).
Sourcepub fn frame_duration(&self) -> Duration
pub fn frame_duration(&self) -> Duration
Frame duration as a Duration.
Trait Implementations§
Source§impl Clone for AudioConfig
impl Clone for AudioConfig
Source§fn clone(&self) -> AudioConfig
fn clone(&self) -> AudioConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AudioConfig
impl Debug for AudioConfig
Auto Trait Implementations§
impl Freeze for AudioConfig
impl RefUnwindSafe for AudioConfig
impl Send for AudioConfig
impl Sync for AudioConfig
impl Unpin for AudioConfig
impl UnwindSafe for AudioConfig
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