Struct alac::Decoder
[−]
[src]
pub struct Decoder { /* fields omitted */ }
An ALAC packet decoder.
Methods
impl Decoder
[src]
fn new(config: StreamInfo) -> Decoder
[src]
Creates a Decoder
for a stream described by the StreamInfo
.
fn stream_info(&self) -> &StreamInfo
[src]
Returns the StreamInfo
used to create this decoder.
fn decode_packet<'a, S: Sample>(
&mut self,
packet: &[u8],
out: &'a mut [S]
) -> Result<&'a [S], InvalidData>
[src]
&mut self,
packet: &[u8],
out: &'a mut [S]
) -> Result<&'a [S], InvalidData>
Decodes an ALAC packet 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
.