[−][src]Struct dsf::FmtChunk
The fmt chunk contains information about the audio format.
- Channel type: mono, stereo, 5.1, etc.
- Channel number: 1 for mono, 2 for stereo, etc.
- Sampling frequency: the DSD sampling frequency.
- Bits per sample: whether the samples are big or little endian encoded.
- Block size per channel: this should always be 4096 bytes.
Methods
impl FmtChunk
[src]
pub fn channel_type(&self) -> &ChannelType
[src]
Return a reference to the ChannelType.
pub fn channel_num(&self) -> u32
[src]
Return the number of channels. This should be in the range 1 to 6.
pub fn sampling_frequency(&self) -> u32
[src]
Return the sampling freqency. DSD sampling frequencies are much higher than PCM because of the 1-bit sampling, so you should get values like:
- 2822400 Hz for DSD64
- 5644800 Hz for DSD128
- 11289600 Hz for DSD256
and so on.
pub fn bits_per_sample(&self) -> u32
[src]
Returns the bits_per_sample
field. This is a bit of a
misnomer in my opinion, but that’s what’s in the DSF
specification. If it is equal to 1 then the sample data is
stored least significant bit first. If it is equal to 8 then
the sample data is stored most significant bit first.
pub fn sample_count(&self) -> u64
[src]
Return the number of DSD samples per channel.
pub fn block_size_per_channel(&self) -> u32
[src]
Return the block size per channel in bytes. This is fixed and should always be 4096 bytes.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for FmtChunk
impl Send for FmtChunk
impl Sync for FmtChunk
impl Unpin for FmtChunk
impl UnwindSafe for FmtChunk
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,