pub struct AudioMetadata {
pub format: AudioFormat,
pub channels: Option<u16>,
pub sample_rate: Option<u32>,
pub bit_depth: Option<u16>,
pub duration_sec: Option<f64>,
}Expand description
Audio metadata extracted during format detection.
Fields§
§format: AudioFormatDetected container/codec format.
channels: Option<u16>Number of audio channels (if determinable from header).
sample_rate: Option<u32>Sample rate in Hz (if determinable from header).
bit_depth: Option<u16>Bit depth (if applicable for PCM formats).
duration_sec: Option<f64>Total duration in seconds (if available in container).
Implementations§
Source§impl AudioMetadata
impl AudioMetadata
Sourcepub const fn format_only(format: AudioFormat) -> Self
pub const fn format_only(format: AudioFormat) -> Self
Create metadata with only format known (minimal detection).
Sourcepub const fn with_properties(
format: AudioFormat,
channels: u16,
sample_rate: u32,
bit_depth: Option<u16>,
) -> Self
pub const fn with_properties( format: AudioFormat, channels: u16, sample_rate: u32, bit_depth: Option<u16>, ) -> Self
Create metadata with format and basic audio properties.
Trait Implementations§
Source§impl Clone for AudioMetadata
impl Clone for AudioMetadata
Source§fn clone(&self) -> AudioMetadata
fn clone(&self) -> AudioMetadata
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 AudioMetadata
impl Debug for AudioMetadata
Source§impl PartialEq for AudioMetadata
impl PartialEq for AudioMetadata
impl Copy for AudioMetadata
impl StructuralPartialEq for AudioMetadata
Auto Trait Implementations§
impl Freeze for AudioMetadata
impl RefUnwindSafe for AudioMetadata
impl Send for AudioMetadata
impl Sync for AudioMetadata
impl Unpin for AudioMetadata
impl UnsafeUnpin for AudioMetadata
impl UnwindSafe for AudioMetadata
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