use thiserror::Error;
#[derive(Debug, Error)]
pub enum StreamingError {
#[error(transparent)]
Io(#[from] std::io::Error),
#[error(transparent)]
AudioSamples(#[from] audio_samples::AudioSampleError),
#[error(transparent)]
AudioIO(#[from] audio_samples_io::AudioIOError),
#[error("stream exhausted")]
Exhausted,
#[error("format mismatch: {0}")]
FormatMismatch(String),
#[error("unsupported: {0}")]
Unsupported(String),
#[error("parameter error: {0}")]
Parameter(String),
}
pub type StreamingResult<T> = Result<T, StreamingError>;