#[non_exhaustive]pub enum Error {
InvalidSampleRate {
hz: u32,
},
ChannelMismatch {
expected: usize,
got: usize,
},
InvalidChannelLayout {
got: usize,
max: usize,
},
NoModesSelected,
InterleavedLengthNotMultiple {
samples: usize,
channels: usize,
},
PlanarLengthMismatch {
first: usize,
got: usize,
},
LraRequiresAlloc,
IntegratedRequiresAlloc,
NonFiniteSample,
}Expand description
Errors returned from analyzer construction or sample ingestion.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidSampleRate
The requested sample rate is not one of the supported rates (22 050, 32 000, 44 100, 48 000, 88 200, 96 000, 192 000 Hz).
ChannelMismatch
The number of channels in a push call did not match the layout
the analyzer was built with.
Fields
InvalidChannelLayout
The configured channel layout was empty or exceeded the supported maximum.
NoModesSelected
AnalyzerBuilder::build was called without selecting any Mode.
At least one mode must be requested.
InterleavedLengthNotMultiple
push_interleaved was called with a buffer whose length is not a
whole multiple of the channel count.
PlanarLengthMismatch
push_planar was called with channel slices of differing length.
Fields
LraRequiresAlloc
Loudness Range (Mode::Lra) requires the alloc feature, which is
not enabled in this build.
IntegratedRequiresAlloc
Integrated loudness (Mode::Integrated) requires the alloc
feature, which is not enabled in this build.
NonFiniteSample
A sample value was non-finite (NaN or infinity). The analyzer rejects these rather than silently propagating; sanitize at the caller.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Error
impl<'de> Deserialize<'de> for Error
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Error for Error
Available on crate feature std only.
impl Error for Error
std only.1.30.0 · 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()