pub enum ResampleError {
InvalidSampleRate {
rate: f64,
},
InvalidChannelCount(usize),
InvalidChunkSize(usize),
BufferTooSmall {
needed: usize,
have: usize,
},
InputLengthMismatch {
expected: usize,
actual: usize,
},
ResampleFailed(String),
Core(AudioError),
}Expand description
Errors that can arise while validating or resampling audio data.
Variants§
InvalidSampleRate
The sample rate is not a positive, finite, supported value.
InvalidChannelCount(usize)
The channel count is zero or otherwise unsupported.
InvalidChunkSize(usize)
The fixed chunk size is zero or otherwise unsupported.
BufferTooSmall
The destination buffer was smaller than required.
InputLengthMismatch
The input length did not match the implementation’s fixed chunk × channels.
Fields
ResampleFailed(String)
A rubato runtime error. The original message is wrapped as a string to avoid matching rubato’s non-exhaustive error variants.
Core(AudioError)
Forwarded audio-core-bsd error.
Trait Implementations§
Source§impl Clone for ResampleError
impl Clone for ResampleError
Source§fn clone(&self) -> ResampleError
fn clone(&self) -> ResampleError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResampleError
impl Debug for ResampleError
Source§impl Display for ResampleError
impl Display for ResampleError
Source§impl Error for ResampleError
impl Error for ResampleError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<AudioError> for ResampleError
impl From<AudioError> for ResampleError
Source§fn from(source: AudioError) -> Self
fn from(source: AudioError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ResampleError
impl PartialEq for ResampleError
impl StructuralPartialEq for ResampleError
Auto Trait Implementations§
impl Freeze for ResampleError
impl RefUnwindSafe for ResampleError
impl Send for ResampleError
impl Sync for ResampleError
impl Unpin for ResampleError
impl UnsafeUnpin for ResampleError
impl UnwindSafe for ResampleError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more