[−][src]Struct bwavfile::WaveReader
Wave, Broadcast-WAV and RF64/BW64 parser/reader.
Resources
Implementation of Broadcast Wave Files
- EBU Tech 3285 (May 2011), "Specification of the Broadcast Wave Format (BWF)"
Implementation of 64-bit Wave Files
-
ITU-R 2088 (October 2019), "Long-form file format for the international exchange of audio programme materials with metadata"
- Presently in force, adopted by the EBU in EBU Tech 3306v2 (June 2018).
-
EBU Tech 3306v1 (July 2009), "MBWF / RF64: An extended File Format for Audio"
- No longer in force, however long-established.
Implementation of Wave format fmt
chunk
Other resources
- RFC 3261 (June 1998) "WAVE and AVI Codec Registries"
- Peter Kabal, McGill University
- Multimedia Programming Interface and Data Specifications 1.0 IBM Corporation and Microsoft Corporation, (August 1991)
Fields
inner: R
Implementations
impl<R: Read + Seek> WaveReader<R>
[src]
pub fn validate_readable(&mut self) -> Result<(), ParserError>
[src]
Returns without Err
if the source meets the minimum standard of
readability by a permissive client:
fmt
chunk anddata
chunk are presentfmt
chunk appears beforedata
chunk
pub fn validate_minimal(&mut self) -> Result<(), ParserError>
[src]
Validate minimal WAVE file
Returns without Err
the source is validate_readable
AND
- Contains only a
fmt
chunk anddata
chunk, with no other chunks present - is not an RF64/BW64
Some clients require a WAVE file to only contain format and data without any other metadata and this function is provided to validate this condition.
pub fn validate_broadcast_wave(&mut self) -> Result<(), ParserError>
[src]
Validate Broadcast-WAVE file format
Returns without Err
if validate_readable()
and file contains a
Broadcast-WAV metadata record (a bext
chunk).
pub fn validate_data_chunk_alignment(&mut self) -> Result<(), ParserError>
[src]
Verify data is aligned to a block boundary
Returns without Err
if validate_readable()
and the start of the
data
chunk's content begins at 0x4000.
pub fn validate_prepared_for_append(&mut self) -> Result<(), ParserError>
[src]
Returns without Err
if:
validate_readable()
- there is a
JUNK
orFLLR
immediately at the beginning of the chunk list adequately large enough to be overwritten by ads64
(96 bytes) data
is the final chunk
impl WaveReader<File>
[src]
pub fn open(path: &str) -> Result<Self, ParserError>
[src]
Open a file for reading.
A convenience that opens path
and calls Self::new()
impl<R: Read + Seek> WaveReader<R>
[src]
pub fn new(inner: R) -> Result<Self, ParserError>
[src]
Wrap a Read
struct in a new WaveReader
.
This is the primary entry point into the WaveReader
interface. The
stream passed as inner
must be at the beginning of the header of the
WAVE data. For a .wav file, this means it must be at the start of the
file.
This function does a minimal validation on the provided stream and
will return an Err(errors::Error)
immediately if there is a structural
inconsistency that makes the stream unreadable or if it's missing
essential components that make interpreting the audio data impoossible.
pub fn into_inner(self) -> R
[src]
Unwrap and reliqnish ownership of the inner reader.
pub fn audio_frame_reader(
&mut self
) -> Result<AudioFrameReader<RawChunkReader<'_, R>>, ParserError>
[src]
&mut self
) -> Result<AudioFrameReader<RawChunkReader<'_, R>>, ParserError>
Create an AudioFrameReader
for reading each audio frame.
pub fn frame_length(&mut self) -> Result<u64, ParserError>
[src]
The count of audio frames in the file.
pub fn format(&mut self) -> Result<WaveFmt, ParserError>
[src]
Sample and frame format of this wave file.
pub fn broadcast_extension(&mut self) -> Result<Bext, ParserError>
[src]
The Broadcast-WAV metadata record for this file.
impl<R: Read + Seek> WaveReader<R>
[src]
pub fn get_chunk_extent_at_index(
&mut self,
fourcc: FourCC,
index: u32
) -> Result<(u64, u64), ParserError>
[src]
&mut self,
fourcc: FourCC,
index: u32
) -> Result<(u64, u64), ParserError>
Trait Implementations
Auto Trait Implementations
impl<R> RefUnwindSafe for WaveReader<R> where
R: RefUnwindSafe,
R: RefUnwindSafe,
impl<R> Send for WaveReader<R> where
R: Send,
R: Send,
impl<R> Sync for WaveReader<R> where
R: Sync,
R: Sync,
impl<R> Unpin for WaveReader<R> where
R: Unpin,
R: Unpin,
impl<R> UnwindSafe for WaveReader<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>,