riff_wave_reader/
error.rs1use std::io;
2use thiserror::Error;
3
4#[derive(Debug, Error)]
5pub enum Error {
6 #[error("Not a riff file")]
7 NotRiff,
8 #[error("Not a wave format file")]
9 NotWave,
10 #[error("Invalid fmt chunk")]
11 InvalidFmtChunk,
12 #[error("Invalid Extended Info, less than 22 bytes")]
13 InvalidExtendedInfo,
14 #[error("IO error reading file: {0}")]
15 IOError(io::Error),
16}
17
18impl From<io::Error> for Error {
19 fn from(error: io::Error) -> Self {
20 Error::IOError(error)
21 }
22}