pub trait SampleResourceInfo:
Send
+ Sync
+ 'static {
// Required methods
fn num_channels(&self) -> NonZeroUsize;
fn len_frames(&self) -> u64;
}Expand description
Trait returning information about a resource of audio samples
Required Methods§
Sourcefn num_channels(&self) -> NonZeroUsize
fn num_channels(&self) -> NonZeroUsize
The number of channels in this resource.
Sourcefn len_frames(&self) -> u64
fn len_frames(&self) -> u64
The length of this resource in samples (of a single channel of audio).
Not to be confused with video frames.
Implementations on Foreign Types§
Source§impl SampleResourceInfo for Vec<Vec<f32>>
impl SampleResourceInfo for Vec<Vec<f32>>
fn num_channels(&self) -> NonZeroUsize
fn len_frames(&self) -> u64
Source§impl SampleResourceInfo for Vec<Vec<i16>>
impl SampleResourceInfo for Vec<Vec<i16>>
fn num_channels(&self) -> NonZeroUsize
fn len_frames(&self) -> u64
Source§impl SampleResourceInfo for Vec<Vec<u16>>
impl SampleResourceInfo for Vec<Vec<u16>>
fn num_channels(&self) -> NonZeroUsize
fn len_frames(&self) -> u64
Implementors§
impl SampleResourceInfo for DecodedAudio
Available on crate feature
symphonium only.impl SampleResourceInfo for DecodedAudioF32
Available on crate feature
symphonium only.