pub struct WavDecoder;Expand description
WAV/PCM audio decoder using the hound crate.
Supports 16-bit and 24-bit PCM with mono or stereo channels and normalizes all samples into the [-1.0, 1.0] range.
Implementations§
Source§impl WavDecoder
impl WavDecoder
Sourcepub fn decode(data: &[u8]) -> Result<DecodedAudio>
pub fn decode(data: &[u8]) -> Result<DecodedAudio>
Decode WAV audio from a byte slice.
Sourcepub fn decode_from_reader<R: Read + Seek>(reader: R) -> Result<DecodedAudio>
pub fn decode_from_reader<R: Read + Seek>(reader: R) -> Result<DecodedAudio>
Decode WAV audio from any reader implementing Read + Seek.
Trait Implementations§
Source§impl Clone for WavDecoder
impl Clone for WavDecoder
Source§fn clone(&self) -> WavDecoder
fn clone(&self) -> WavDecoder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WavDecoder
impl Debug for WavDecoder
Source§impl Default for WavDecoder
impl Default for WavDecoder
Source§fn default() -> WavDecoder
fn default() -> WavDecoder
Returns the “default value” for a type. Read more
impl Copy for WavDecoder
Auto 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