Struct radiorust::blocks::transform::GainControl
source · pub struct GainControl<Flt> { /* private fields */ }
Expand description
Gain control
Note that while this block works with generic Float
s, the gain
value
passed to GainControl::new
and GainControl::set
is of type f64
.
The gain
value is multiplied with each sample such that a value of 0.5
corresponds to −0.6 dB.
Example
use radiorust::blocks::transform::GainControl;
let attenuate_6db = GainControl::<f32>::new(0.5f64);
Implementations
Trait Implementations
sourceimpl<Flt> Consumer<Samples<Complex<Flt>>> for GainControl<Flt>
impl<Flt> Consumer<Samples<Complex<Flt>>> for GainControl<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 GainControl<Flt>
impl<Flt> Producer<Samples<Complex<Flt>>> for GainControl<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 GainControl<Flt>
impl<Flt> Send for GainControl<Flt>where
Flt: Send + Sync,
impl<Flt> Sync for GainControl<Flt>where
Flt: Send + Sync,
impl<Flt> Unpin for GainControl<Flt>
impl<Flt> !UnwindSafe for GainControl<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