Struct radiorust::blocks::resampling::Upsampler
source · pub struct Upsampler<Flt> { /* private fields */ }
Expand description
Increase sample rate
Implementations§
source§impl<Flt> Upsampler<Flt>where
Flt: Float,
impl<Flt> Upsampler<Flt>where
Flt: Float,
sourcepub fn new(output_chunk_len: usize, output_rate: f64, bandwidth: f64) -> Self
pub fn new(output_chunk_len: usize, output_rate: f64, bandwidth: f64) -> Self
Create new Upsampler
block
This call corresponds to Upsampler::with_quality
with a quality
value of 3.0
.
Connected Producer
s must emit Signal::Samples
with a
sample_rate
equal to or smaller than output_rate
but larger than
bandwidth
; otherwise a panic occurs.
Aliasing is suppressed for frequencies lower than bandwidth
.
sourcepub fn with_quality(
output_chunk_len: usize,
output_rate: f64,
bandwidth: f64,
quality: f64
) -> Self
pub fn with_quality(
output_chunk_len: usize,
output_rate: f64,
bandwidth: f64,
quality: f64
) -> Self
Create new Upsampler
block with quality
setting
Same as Upsampler::new
, but allows to specify a quality
setting,
which must be equal to or greater than 1.0
.
Trait Implementations§
source§impl<Flt> Consumer<Signal<Complex<Flt>>> for Upsampler<Flt>
impl<Flt> Consumer<Signal<Complex<Flt>>> for Upsampler<Flt>
source§fn receiver_connector(&self) -> &ReceiverConnector<Signal<Complex<Flt>>>
fn receiver_connector(&self) -> &ReceiverConnector<Signal<Complex<Flt>>>
Obtain reference to
ReceiverConnector
source§fn feed_from_none(&self)
fn feed_from_none(&self)
Disconnect
Consumer
from any connected Producer
if connected