pub enum Error {
Show 18 variants
MustSetInputSampleRate,
MustSetOutputSampleRate,
InvalidChannels(usize),
InvalidQuality(usize),
QualityTooHighForF32,
InvalidBandwidth(f32),
InvalidPhase(f32),
InvalidPhaseIntensity(f32),
InvalidAlpha(f32),
WrongChannelCount {
expected: usize,
actual: usize,
},
WrongFrameCount {
expected: usize,
actual: usize,
},
MalformedInputLength {
channels: usize,
samples: usize,
},
DanglingPartialFrame {
channels: usize,
samples: usize,
},
WrongChunkLength {
expected: usize,
actual: usize,
},
InsufficientOutputBuffer {
expected: usize,
actual: usize,
},
AlreadyFinalized,
Fft(String),
PresetNotConfigured,
}Expand description
Ardftsrc error types.
Variants§
MustSetInputSampleRate
Input sample rate was not set or is zero before an operation that requires it.
MustSetOutputSampleRate
Output sample rate was not set or is zero before an operation that requires it.
InvalidChannels(usize)
Channel count is zero.
InvalidQuality(usize)
Quality setting is zero.
QualityTooHighForF32
f32 samples cannot use arbitrarily large FFT geometries derived from quality.
InvalidBandwidth(f32)
Bandwidth is outside the valid normalized range [0.0, 1.0].
InvalidPhase(f32)
Phase is outside the valid normalized range [-1.0, 1.0].
InvalidPhaseIntensity(f32)
Phase intensity is outside the valid range [0.0, 100.0].
InvalidAlpha(f32)
Cosine taper alpha is non-finite or not greater than zero.
WrongChannelCount
Wrong channel count.
WrongFrameCount
Wrong frame count.
MalformedInputLength
Interleaved input length is not divisible by channel count.
DanglingPartialFrame
Finalization was requested with an incomplete interleaved frame still buffered.
WrongChunkLength
Chunk size does not match the expected stream chunk length.
InsufficientOutputBuffer
Provided output buffer is smaller than required for produced samples.
AlreadyFinalized
Additional input was submitted after final input was already provided.
Fft(String)
FFT backend reported an internal failure.
PresetNotConfigured
A preset config was used before required sample rates and channel count were set.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()