Expand description
Signal processing blocks that can be connected with each other
This module and its submodules contain signal processing blocks, which will
produce or consume data of type Samples<Complex<Flt>>
, where
Samples
are chunk
s of data with a specified sample_rate
.
Complex<Flt>
is a complex number where real and imaginary part are of
type Flt
.
Blocks will require that Flt
implements Float
, i.e. Flt
is either
f32
or f64
, depending on desired precision.
Note: For real valued samples, use Complex
with an imaginary part of
zero. This allows using blocks which are implemented with a complex fourier
transform.
There is no data structure describing the graph of connected blocks.
Instead, any Producer<T>
can be connected with any Consumer<T>
, see
Producer::feed_into
or Consumer::feed_from
.
Blocks will usually spawn
a task, and thus require an active
tokio::runtime::Runtime
while being created. The spawned task will
usually keep working even if a block gets dropped as long as there is a
connected Producer
and a connected Consumer
. Thus creating circles
must be avoided. Note: I/O blocks are an exception to this rule: when
they are dropped, they will stop working.
Connecting a Producer
to more than one Consumer
at the same time will
stall all involved blocks if one of the Consumer
s is stalled; i.e. all
Consumer
s must process the data in order for the Producer
to be able to
send further data.
Refer to the Buffer
block for tweaking buffering behavior, including
dropping data in case of congestion.
Re-exports
pub use self::prelude::*;