Struct alac::Packets
[−]
[src]
pub struct Packets<R: Read + Seek, S> { /* fields omitted */ }
An iterator-like type that decodes packets into a user-provided buffer.
Methods
impl<R: Read + Seek, S: Sample> Packets<R, S>
[src]
fn format(&self) -> Format
[src]
Returns the format of this ALAC file.
fn stream_info(&self) -> &StreamInfo
[src]
Returns a StreamInfo
describing the ALAC stream in this file.
fn next_into<'a>(
&mut self,
out: &'a mut [S]
) -> Result<Option<&'a [S]>, ReadError>
[src]
&mut self,
out: &'a mut [S]
) -> Result<Option<&'a [S]>, ReadError>
Reads the next packet and decodes it into out
.
Channels are interleaved, e.g. for a stereo packet out
would contains samples in the
order [left, right, left, right, ..]
.
Panics if out
is shorter than StreamInfo::max_samples_per_packet
.