Implementation of complex formats

This commit is contained in:
Jamie Hardt
2020-11-23 22:38:10 -08:00
parent 358aa06f7c
commit 34e473dc49
10 changed files with 275 additions and 62 deletions

View File

@@ -1,6 +1,8 @@
use std::io;
use super::fourcc::FourCC;
use uuid;
/// Errors returned by methods in this crate.
#[derive(Debug)]
pub enum Error {
@@ -8,6 +10,9 @@ pub enum Error {
/// An `io::Error` occurred
IOError(io::Error),
/// An error occured reading a tag UUID
UuidError(uuid::Error),
/// The file does not begin with a recognized WAVE header
HeaderNotRecognized,
@@ -34,7 +39,8 @@ pub enum Error {
InsufficientDS64Reservation {expected: u64, actual: u64},
/// The file is not optimized for writing new data
DataChunkNotPreparedForAppend
DataChunkNotPreparedForAppend,
}
@@ -42,4 +48,10 @@ impl From<io::Error> for Error {
fn from(error: io::Error) -> Error {
Error::IOError(error)
}
}
impl From <uuid::Error> for Error {
fn from(error: uuid::Error) -> Error {
Error::UuidError(error)
}
}