pub struct Reader<R: Read + Seek> { /* private fields */ }
Expand description
An ALAC reader and decoder supporting mp4
and caf
files (if the respective Cargo features
are enabled).
Implementations§
Source§impl<R: Read + Seek> Reader<R>
impl<R: Read + Seek> Reader<R>
Sourcepub fn new(reader: R) -> Result<Reader<R>, ReadError>
pub fn new(reader: R) -> Result<Reader<R>, ReadError>
Attempts to create a Reader
from a seekable byte stream.
Sourcepub fn stream_info(&self) -> &StreamInfo
pub fn stream_info(&self) -> &StreamInfo
Returns a StreamInfo
describing the ALAC stream in this file.
Sourcepub fn into_samples<S: Sample>(self) -> Samples<R, S> ⓘ
pub fn into_samples<S: Sample>(self) -> Samples<R, S> ⓘ
Returns an iterator over the samples in the ALAC stream.
Channels are interleaved, e.g. for a stereo stream they would be yielded in the order
[left, right, left, right, ..]
.
Sourcepub fn into_packets<S: Sample>(self) -> Packets<R, S>
pub fn into_packets<S: Sample>(self) -> Packets<R, S>
Returns an iterator-like type that decodes packets into a user-provided buffer.
Auto Trait Implementations§
impl<R> Freeze for Reader<R>where
R: Freeze,
impl<R> RefUnwindSafe for Reader<R>where
R: RefUnwindSafe,
impl<R> Send for Reader<R>where
R: Send,
impl<R> Sync for Reader<R>where
R: Sync,
impl<R> Unpin for Reader<R>where
R: Unpin,
impl<R> UnwindSafe for Reader<R>where
R: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more