ofxPDSP
|
The bridge between pdsp and the audio callback. More...
#include <Processor.h>
Public Member Functions | |
Processor (int channels) | |
void | process (const int &bufferSize) noexcept |
simply process the channes without copying them, useful if you want just to split the processing in multiple calls. More... | |
void | processAndCopyOutput (float **bufferToFill, const int &channelsNum, const int &bufferSize) noexcept |
process all the DSP recursively and copies them to an array of pointer to arrays (channels) More... | |
void | processAndCopyInterleaved (float *bufferToFill, const int &channelsNum, const int &bufferSize) noexcept |
process all the DSP recursively and copies the result to an array of interleaved values More... | |
void | resize (int channelsNum) |
change the number of output channels; More... | |
Public Attributes | |
std::vector< PatchNode > | channels |
an array of channels. Patch your Units and modules to this channels thinking to them as your system final output | |
PatchNode | blackhole |
all the connectio patched to this will be processed but not outputted. Patch your Units and modules to this channels if you need them to be always active for some reason; | |
The bridge between pdsp and the audio callback.
One of the processAndCopy... method of this class has to be called inside the audio callback, it will recursively process all the Units and modules patched to the input channels and copy the results to the audio callback. The standard constructor has 2 channels, but you can change the number of channels simply using resize() on the channels vector.
|
noexcept |
simply process the channes without copying them, useful if you want just to split the processing in multiple calls.
Sometimes maybe you want to split the process in multiple process calls, so you can patch a Processor channels into another processor, call process() on the first processor and processAndCopy on the second.
|
noexcept |
process all the DSP recursively and copies the result to an array of interleaved values
[in] | bufferToFill | interleaved array of audio buffers to render |
[in] | channelsNum | number of channels |
[in] | bufferSize | number of samples to render |
|
noexcept |
process all the DSP recursively and copies them to an array of pointer to arrays (channels)
[in] | bufferToFill | multidimensional array of audio buffers to render |
[in] | channelsNum | number of channels |
[in] | bufferSize | number of samples to render |
void pdsp::Processor::resize | ( | int | channelsNum | ) |
change the number of output channels;
[in] | channelsNum | number of channels |