[−][src]Struct bwavfile::AudioFrameReader
Read audio frames
The inner reader is interpreted as a raw audio data
bitstream having a format specified by format
.
Implementations
impl<R: Read + Seek> AudioFrameReader<R>
[src]
pub fn new(inner: R, format: WaveFmt) -> Self
[src]
Create a new AudioFrameReader
Panics
This method does a few sanity checks on the provided format
parameter to confirm the block_alignment
law is fulfilled
and the format tag is readable by this implementation (only
format 0x01 is supported at this time.)
pub fn locate(&mut self, to: u64) -> Result<u64, Error>
[src]
Locate the read position to a different frame
Seeks within the audio stream.
pub fn create_frame_buffer(&self) -> Vec<i32>
[src]
Create a frame buffer sized to hold frames of the reader
This is a conveneince method that creates a Vec<i32>
with
as many elements as there are channels in the underlying stream.
pub fn read_integer_frame(&mut self, buffer: &mut [i32]) -> Result<u64, Error>
[src]
Read a frame
A single frame is read from the audio stream and the read location is advanced one frame.
Panics
The buffer
must have a number of elements equal to the number of
channels and this method will panic if this is not the case.
Trait Implementations
Auto Trait Implementations
impl<R> RefUnwindSafe for AudioFrameReader<R> where
R: RefUnwindSafe,
R: RefUnwindSafe,
impl<R> Send for AudioFrameReader<R> where
R: Send,
R: Send,
impl<R> Sync for AudioFrameReader<R> where
R: Sync,
R: Sync,
impl<R> Unpin for AudioFrameReader<R> where
R: Unpin,
R: Unpin,
impl<R> UnwindSafe for AudioFrameReader<R> where
R: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,