[][src]Struct dsf::InterleavedU32SamplesIter

pub struct InterleavedU32SamplesIter<'a> { /* fields omitted */ }

Iterator which returns samples as a u32.

Each call of next() returns 32 DSD samples as a u32. The samples are interleaved in the sense that for a stereo file each iteration will return: left, right, left, right, left…

This is typically how DSD data is sent to a DAC.

Methods

impl<'a> InterleavedU32SamplesIter<'a>[src]

pub fn sample_index(&self) -> u64[src]

Return the current sample_index, which starts from 0 and goes up to sample_count - 1.

pub fn sample_count(&self) -> u64[src]

Return the sample count for the associated DSF file.

pub fn set_sample_index(&mut self, sample_index: u64) -> Result<u64, Error>[src]

Set the position of this iterator, so that sample_index is included in the next iteration. The returned sample_index is normalised so that it corresponds to the first 1-bit sample in the next returned u32. An error is returned if the requested sample_index is out of range.

Trait Implementations

impl<'a> Iterator for InterleavedU32SamplesIter<'a>[src]

type Item = u32

The type of the elements being iterated over.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.