#![forbid(unsafe_code)]
#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum Error {
#[error("sample rate {0} has no ADTS sampling_frequency_index")]
UnsupportedSampleRate(u32),
#[error(
"frame too large for the 13-bit ADTS length field: header + payload = {0} bytes (max 8191)"
)]
FrameTooLarge(usize),
#[error("bad ADTS sync word")]
BadSync,
#[error("reserved/unsupported sampling_frequency_index {0}")]
UnsupportedSamplingFrequencyIndex(u8),
}