pub struct WavDecoder { /* private fields */ }Expand description
A hound-backed decoder for RIFF WAVE containers.
Construct with WavDecoder::open, then drive through the
ContainerDecoder trait. See the module docs for the
worker-thread / sample-normalisation / planar-layout contract.
Implementations§
Source§impl WavDecoder
impl WavDecoder
Sourcepub fn open(path: &Path) -> Result<Self>
pub fn open(path: &Path) -> Result<Self>
Open the WAV file at path for decoding.
The header is parsed eagerly; the spec is available immediately via the
subsequent ContainerDecoder::open call. This is the recommended
constructor — it mirrors ContainerDecoder::open but yields Self
for ergonomic chaining.
§Errors
Returns CodecError::Io if the file cannot be opened or its header
is not a valid RIFF WAVE.
Trait Implementations§
Source§impl ContainerDecoder for WavDecoder
impl ContainerDecoder for WavDecoder
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 Freeze for WavDecoder
impl RefUnwindSafe for WavDecoder
impl Send for WavDecoder
impl Sync for WavDecoder
impl Unpin for WavDecoder
impl UnsafeUnpin for WavDecoder
impl UnwindSafe for WavDecoder
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