pub struct StreamingAudioInfo {
pub sample_rate: u32,
pub channels: u8,
pub bit_depth: u8,
pub total_frames: u64,
pub is_lossy: bool,
}Expand description
Audio information for streaming
Fields§
§sample_rate: u32Sample rate in Hz
channels: u8Number of channels
bit_depth: u8Bits per sample
total_frames: u64Total frames (if known)
is_lossy: boolIs lossy encoding
Implementations§
Source§impl StreamingAudioInfo
impl StreamingAudioInfo
Sourcepub fn duration_secs(&self) -> f64
pub fn duration_secs(&self) -> f64
Calculate duration in seconds
Sourcepub fn total_samples(&self) -> u64
pub fn total_samples(&self) -> u64
Calculate samples per channel
Trait Implementations§
Source§impl Clone for StreamingAudioInfo
impl Clone for StreamingAudioInfo
Source§fn clone(&self) -> StreamingAudioInfo
fn clone(&self) -> StreamingAudioInfo
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 moreAuto Trait Implementations§
impl Freeze for StreamingAudioInfo
impl RefUnwindSafe for StreamingAudioInfo
impl Send for StreamingAudioInfo
impl Sync for StreamingAudioInfo
impl Unpin for StreamingAudioInfo
impl UnwindSafe for StreamingAudioInfo
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