mirror of
https://github.com/iluvcapra/bwavfile.git
synced 2026-01-01 09:20:45 +00:00
Avoid panics when incorrect buffer sizes are provided to read/write_frames
This commit is contained in:
@@ -41,6 +41,12 @@ pub enum Error {
|
||||
|
||||
/// The file is not optimized for writing new data
|
||||
DataChunkNotPreparedForAppend,
|
||||
|
||||
/// A buffer with a length that isn't a multiple of channel_count was provided
|
||||
InvalidBufferSize {
|
||||
buffer_size: usize,
|
||||
channel_count: u16,
|
||||
},
|
||||
}
|
||||
|
||||
impl StdError for Error {}
|
||||
|
||||
Reference in New Issue
Block a user