int BelaContextSplitter::setup |
( |
unsigned int |
in, |
|
|
unsigned int |
out, |
|
|
const BelaContext * |
context |
|
) |
| |
Initialize the object. The #in and #out parameters will determine the frames ratio between the input context (passsed through push(), and of which a template has to be provided here as #context), and the output contexts (retrieved via pop()) The output contexts will have a frame count that is #out/#in the ones of the input contexts.
- Parameters
-
in | how many input contexts are needed to create 1 output context |
out | how many output contexts |
context | a template input context. F |
- Precondition
- One of #in or #out has to be 1.
-
Calls to push() will have to pass a BelaContext which is compatible (same number of channels) with the one passed here
- Returns
- 0 on success, an error code otherwise.
int BelaContextSplitter::push |
( |
const BelaContext * |
inContext | ) |
|
Add a context for processing.
- Parameters
-
inContext | the context to process. This has to have the same number of I/O channels as the one passed to setup() |
Retrieve an output BelaContext, if there is one available.
- Returns
- a pointer to a BelaContext, or null if there is none available.
Return one of the output contexts, initialised, but containing invalid data.
Copy context by allocating memory as necessary.
Copy context data between two pre-allocated contexts. The caller has to ensure that the number of analog, audio and digital frames and channels has to be the same between the two contexts.
The documentation for this class was generated from the following file: