pub struct Decoder { /* private fields */ }Expand description
A running decode session for one audio file.
Implementations§
Source§impl Decoder
impl Decoder
Sourcepub fn open<P: AsRef<Path>>(path: P) -> Result<Self, Error>
pub fn open<P: AsRef<Path>>(path: P) -> Result<Self, Error>
Open path and start decoding. Blocks while another Decoder
exists anywhere in the process (the codec state is global).
Sourcepub fn next_chunk(&mut self) -> Option<Chunk>
pub fn next_chunk(&mut self) -> Option<Chunk>
Next buffer of decoded PCM, or None at end of track (or after a
codec error — check Decoder::status).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Decoder
impl !Sync for Decoder
impl !UnwindSafe for Decoder
impl Freeze for Decoder
impl Send for Decoder
impl Unpin for Decoder
impl UnsafeUnpin for Decoder
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