#[non_exhaustive]pub enum Error {
Unsupported(String),
Device(String),
Capture(String),
Playback(String),
Misaligned {
got: usize,
expected: usize,
},
ResamplerConstruction(ResamplerConstructionError),
Resample(ResampleError),
Hang(Error),
Mux(Error),
Net(Error),
TimeOverflow(TimeOverflow),
}Expand description
Errors returned by moq-audio.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unsupported(String)
The requested configuration is outside what the codec supports, e.g. a sample rate, channel count, or frame duration Opus can’t encode. The caller asked for something impossible; picking different settings fixes it.
Device(String)
No audio device matched the requested selector, or the machine has no
default input. Retrying won’t help until the device list changes;
capture::devices reports what is available.
Capture(String)
The capture backend failed or delivered nothing: a denied permission, a device that stopped mid-stream, or a host API error. The configuration may be fine; the device or its permissions are not.
Playback(String)
The playback backend failed: the output device could not be opened, or the
stream stopped and could not be restarted. The device or host API is at
fault, not the configuration; playback::devices reports what is
available.
Misaligned
The input buffer was not aligned to the codec’s frame size.
Fields
ResamplerConstruction(ResamplerConstructionError)
Rubato resampler construction error.
Resample(ResampleError)
Rubato resampler runtime error.
Hang(Error)
hang catalog error.
Mux(Error)
moq-mux container/transport error.
Net(Error)
moq-net transport error.
TimeOverflow(TimeOverflow)
Timestamp overflow.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()