I
- type of the input valuesO
- type of the output valuespublic interface SignalPullProcessor<I,O> extends SignalSource<O>
Capable of processing a given object (most likely a data buffer of type I
(input),
for example a float[]
, and returning another object of type O
(output).
This processor follows the pull model, i.e. the data flow is controlled from the end
of the processing pipeline. If your pipeline must contain forks/splits, to treat bands or channels separately,
this is not a suitable approach. Consider using SignalProcessor
s in
combination with a SignalSplit
.
Typically you specify an SignalSource
and set it as the generator for an SignalPullProcessor
.
Then call SignalSource.read()
to pull the data through the SignalPullProcessor from the SignalSource.
Every pull processor is also a source. To apply multiple processing steps (e.g. stereo to mono, low pass filtering, downsampling), you can chain multiple processors.
SignalProcessor
Modifier and Type | Method and Description |
---|---|
<I2> SignalPullProcessor<I2,I> |
connectTo(SignalPullProcessor<I2,I> source)
Sets the source to use for this
SignalPullProcessor . |
void |
connectTo(SignalSource<I> source)
Sets the source to use for this
SignalPullProcessor . |
SignalSource<I> |
getConnectedSource()
Get the current source/generator.
|
read, reset
<I2> SignalPullProcessor<I2,I> connectTo(SignalPullProcessor<I2,I> source)
SignalPullProcessor
.
Because the method returns its parameter, it encourages
method chaining
to build processing chains/pipelines.I2
- input type of the source processorsource
- sourceSignalPullProcessor
void connectTo(SignalSource<I> source)
SignalPullProcessor
.source
- sourceSignalSource<I> getConnectedSource()
Copyright © 2011–2020 tagtraum industries incorporated. All rights reserved.