pub enum ResampleQuality {
VeryLow,
Low,
High,
HighWithLowLatency,
}Expand description
The quality of the resampling algorithm used for a PacketResampler or a
Resampler created with resampler_from_quality.
Variants§
VeryLow
Low quality, low CPU, low latency
Internally this uses the Async resampler from rubato
with linear polynomial interpolation.
Low
Slightly better quality than ResampleQuality::VeryLow, slightly higher
CPU than ResampleQuality::VeryLow, low latency
Internally this uses the Async resampler from rubato
with cubic polynomial interpolation.
High
Great quality, medium CPU, high latency
This is recommended for most non-realtime applications where higher latency is not an issue.
Note, this resampler type adds a significant amount of latency (in the hundreds of frames), so prefer to use the “Low” option if low latency is desired.
If the fft-resampler feature is not enabled, then this will fall
back to ResampleQuality::Low.
Internally this uses the rubato::Fft resampler from rubato.
HighWithLowLatency
Great quality, high CPU, low latency
Internally this uses the Async resampler from rubato
with Cubic sinc
interpolation, a BlackmanHarris2
window function, a sinc length of 256, and an oversampling factor
of 128.
Trait Implementations§
Source§impl Clone for ResampleQuality
impl Clone for ResampleQuality
Source§fn clone(&self) -> ResampleQuality
fn clone(&self) -> ResampleQuality
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ResampleQuality
Source§impl Debug for ResampleQuality
impl Debug for ResampleQuality
Source§impl Default for ResampleQuality
impl Default for ResampleQuality
Source§fn default() -> ResampleQuality
fn default() -> ResampleQuality
impl Eq for ResampleQuality
Source§impl From<usize> for ResampleQuality
impl From<usize> for ResampleQuality
Source§impl Hash for ResampleQuality
impl Hash for ResampleQuality
Source§impl PartialEq for ResampleQuality
impl PartialEq for ResampleQuality
Source§fn eq(&self, other: &ResampleQuality) -> bool
fn eq(&self, other: &ResampleQuality) -> bool
self and other values to be equal, and is used by ==.