Struct audio_time::System
source · pub struct System {
pub sample_rate: SampleRate,
pub channel_layout: ChannelLayout,
pub sample_type: SampleType,
}Expand description
A struct that encodes all parameters that are needed to interpret an audio time span as number of samples and/or the number of bytes needed to represent it.
Fields§
§sample_rate: SampleRate§channel_layout: ChannelLayout§sample_type: SampleTypeImplementations§
source§impl System
impl System
sourcepub const fn sample_size(&self) -> NonZeroU8
pub const fn sample_size(&self) -> NonZeroU8
The number of bytes used to represent a single sample.
Equal to the sample’s byte depth
(self.sample_type.byte_depth()) times
the number of channels
(self.channel_layout.channels()).