Struct floaout::wav::WavMetadata
source · [−]pub struct WavMetadata {
pub frames: u64,
pub lpcm_kind: LpcmKind,
pub channels: u16,
pub samples_per_sec: f64,
pub list: Vec<Chunk>,
}
Fields
frames: u64
Number of sample frames
lpcm_kind: LpcmKind
channels: u16
Channels
samples_per_sec: f64
Samples per sec
list: Vec<Chunk>
List data
Implementations
sourceimpl WavMetadata
impl WavMetadata
pub const fn new(
frames: u64,
lpcm_kind: LpcmKind,
channels: u16,
samples_per_sec: f64,
list: Vec<Chunk>
) -> Self
pub const fn calculate_frames(
data_size: u32,
channels: u16,
bits_per_sample: u16
) -> u64
pub const fn frames(&self) -> u64
pub const fn lpcm_kind(&self) -> LpcmKind
pub const fn format_tag(&self) -> u16
pub const fn channels(&self) -> u16
pub const fn samples_per_sec(&self) -> f64
pub const fn bits_per_sample(&self) -> u16
pub const fn bytes_per_sample(&self) -> u16
pub const fn block_align(&self) -> u16
pub const fn avg_bytes_per_sec(&self) -> u32
pub const fn data_chunk_size(&self) -> u32
pub const fn standard_riff_chunk_size(&self) -> u32
pub const fn secs(&self) -> u64
pub const fn millis(&self) -> u128
pub const fn micros(&self) -> u128
pub const fn nanos(&self) -> u128
pub fn read<R: Read>(reader: &mut R) -> Result<Self>
pub fn write<W: Write>(&self, writer: &mut W) -> Result<()>
Trait Implementations
sourceimpl Clone for WavMetadata
impl Clone for WavMetadata
sourcefn clone(&self) -> WavMetadata
fn clone(&self) -> WavMetadata
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for WavMetadata
impl Debug for WavMetadata
sourceimpl PartialEq<WavMetadata> for WavMetadata
impl PartialEq<WavMetadata> for WavMetadata
sourcefn eq(&self, other: &WavMetadata) -> bool
fn eq(&self, other: &WavMetadata) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &WavMetadata) -> bool
fn ne(&self, other: &WavMetadata) -> bool
This method tests for !=
.
impl Metadata for WavMetadata
impl StructuralPartialEq for WavMetadata
Auto Trait Implementations
impl RefUnwindSafe for WavMetadata
impl Send for WavMetadata
impl Sync for WavMetadata
impl Unpin for WavMetadata
impl UnwindSafe for WavMetadata
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more