pub struct SymphoniaDecoder { /* private fields */ }Expand description
A symphonia-backed decoder for FLAC (primary) and PCM containers.
Construct with SymphoniaDecoder::open, then drive through the
ContainerDecoder trait. See the module docs for the
worker-thread / planar-layout / end-of-stream contract.
Implementations§
Source§impl SymphoniaDecoder
impl SymphoniaDecoder
Sourcepub fn open(path: &Path) -> Result<Self>
pub fn open(path: &Path) -> Result<Self>
Open the container at path, probe its format, and instantiate the
matching audio decoder for the first audio track.
§Errors
CodecError::Ioif the file cannot be opened.CodecError::Formatif no container or audio track is found.CodecError::Decodeif the codec is not registered.
Trait Implementations§
Source§impl ContainerDecoder for SymphoniaDecoder
impl ContainerDecoder for SymphoniaDecoder
Source§fn open(&mut self, path: &Path) -> Result<StreamInfo>
fn open(&mut self, path: &Path) -> Result<StreamInfo>
Open the container at
path, sniff/probe the format, and return the
stream metadata. Read moreSource§fn next_frame(&mut self) -> Result<Option<AudioFrame>>
fn next_frame(&mut self) -> Result<Option<AudioFrame>>
Decode the next chunk as a planar
AudioFrame. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for SymphoniaDecoder
impl !UnwindSafe for SymphoniaDecoder
impl Freeze for SymphoniaDecoder
impl Send for SymphoniaDecoder
impl Sync for SymphoniaDecoder
impl Unpin for SymphoniaDecoder
impl UnsafeUnpin for SymphoniaDecoder
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