pub struct Reader {
pub cur: Cursor<Vec<u8>>,
pub header: Option<WavHeader>,
}
Expand description
Wav file reader for binary
Fields§
§cur: Cursor<Vec<u8>>
§header: Option<WavHeader>
Implementations§
Source§impl Reader
impl Reader
Sourcepub fn read_header(&mut self) -> Result<WavHeader, DecodeError>
pub fn read_header(&mut self) -> Result<WavHeader, DecodeError>
Read Wav file header
Sourcepub fn read_list_chunk(
&mut self,
header: &mut WavHeader,
) -> Result<usize, DecodeError>
pub fn read_list_chunk( &mut self, header: &mut WavHeader, ) -> Result<usize, DecodeError>
Read a LIST chunk
This function will only progres the internal data cursor when Ok()
is returned
In the case of Err()
, the cursor will not have moved
pub fn analize_list_chunk( &mut self, data: Vec<u8>, header: &mut WavHeader, ) -> usize
pub fn get_samples_f32(&mut self) -> Result<Vec<f32>, DecodeError>
pub fn read_str4(&mut self) -> String
pub fn read_f32(&mut self) -> Option<f32>
pub fn read_f64(&mut self) -> Option<f64>
pub fn read_u64(&mut self) -> Option<u64>
pub fn read_u32(&mut self) -> Option<u32>
pub fn read_i32(&mut self) -> Option<i32>
pub fn read_u24(&mut self) -> Option<u32>
pub fn read_i24(&mut self) -> Option<i32>
pub fn read_u16(&mut self) -> Option<u16>
pub fn read_i16(&mut self) -> Option<i16>
pub fn read_u8(&mut self) -> Option<u8>
Auto Trait Implementations§
impl Freeze for Reader
impl RefUnwindSafe for Reader
impl Send for Reader
impl Sync for Reader
impl Unpin for Reader
impl UnwindSafe for Reader
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