Struct radiorust::blocks::resampling::Upsampler
source · pub struct Upsampler<Flt> { /* private fields */ }
Expand description
Increase sample rate
Implementations
sourceimpl<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 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
sourceimpl<Flt> Consumer<Samples<Complex<Flt>>> for Upsampler<Flt>
impl<Flt> Consumer<Samples<Complex<Flt>>> for Upsampler<Flt>
sourcefn receiver_connector(&self) -> &ReceiverConnector<Samples<Complex<Flt>>>
fn receiver_connector(&self) -> &ReceiverConnector<Samples<Complex<Flt>>>
Obtain reference to
ReceiverConnector
sourcefn feed_from_none(&self)
fn feed_from_none(&self)
Disconnect
Consumer
from any connected Producer
if connectedsourcefn connect_to_producer<P: Producer<T>>(&self, producer: &P)
fn connect_to_producer<P: Producer<T>>(&self, producer: &P)
👎Deprecated since 0.2.0: method has been renamed to
feed_from
Connect
Consumer
to Producer
sourcefn disconnect_from_producer(&self)
fn disconnect_from_producer(&self)
👎Deprecated since 0.2.0: method has been renamed to
feed_from_none
Disconnect
Consumer
from any connected Producer
if connectedsourceimpl<Flt> Producer<Samples<Complex<Flt>>> for Upsampler<Flt>
impl<Flt> Producer<Samples<Complex<Flt>>> for Upsampler<Flt>
sourcefn sender_connector(&self) -> &SenderConnector<Samples<Complex<Flt>>>
fn sender_connector(&self) -> &SenderConnector<Samples<Complex<Flt>>>
Obtain reference to
SenderConnector
sourcefn connect_to_consumer<C: Consumer<T>>(&self, consumer: &C)
fn connect_to_consumer<C: Consumer<T>>(&self, consumer: &C)
👎Deprecated since 0.2.0: method has been renamed to
feed_into
Connect
Producer
to Consumer
Auto Trait Implementations
impl<Flt> !RefUnwindSafe for Upsampler<Flt>
impl<Flt> Send for Upsampler<Flt>where
Flt: Send + Sync,
impl<Flt> Sync for Upsampler<Flt>where
Flt: Send + Sync,
impl<Flt> Unpin for Upsampler<Flt>
impl<Flt> !UnwindSafe for Upsampler<Flt>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more