mirror of
https://github.com/iluvcapra/bwavfile.git
synced 2026-01-01 09:20:45 +00:00
Implementation of complex formats
This commit is contained in:
@@ -4,7 +4,7 @@ use std::io::SeekFrom::{Start,};
|
||||
use byteorder::LittleEndian;
|
||||
use byteorder::ReadBytesExt;
|
||||
|
||||
use super::fmt::WaveFmt;
|
||||
use super::fmt::{WaveFmt};
|
||||
use super::errors::Error;
|
||||
|
||||
/// Read audio frames
|
||||
@@ -33,7 +33,10 @@ impl<R: Read + Seek> AudioFrameReader<R> {
|
||||
"Unable to read audio frames from packed formats: block alignment is {}, should be {}",
|
||||
format.block_alignment, (format.bits_per_sample / 8 ) * format.channel_count);
|
||||
|
||||
assert!(format.tag == 1, "Unsupported format tag {}", format.tag);
|
||||
|
||||
assert!(format.tag == 0x01 ,
|
||||
"Unsupported format tag {:?}", format.tag);
|
||||
|
||||
AudioFrameReader { inner , format }
|
||||
}
|
||||
|
||||
@@ -83,5 +86,4 @@ impl<R: Read + Seek> AudioFrameReader<R> {
|
||||
|
||||
Ok( 1 )
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user