Interface AudioProcessor
Custom DSP in Java, the Codename One counterpart of the Web Audio
AudioWorkletProcessor. An AudioProcessorNode calls process(float[][][], float[][][], float[][]) once per
render quantum of 128 frames, on the render thread.
The arrays follow the worklet's layout: inputs[input][channel][frame],
outputs[output][channel][frame] and parameters[param][frame]. An input
with nothing connected has one silent channel. A parameter whose value is
constant for the quantum is an array of length 1; otherwise it has 128
values. Outputs arrive zeroed.
The method runs on the audio thread: it must not block, wait on the EDT or allocate in steady state, or the output glitches. Keep the arrays only for the duration of the call; they are reused.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanprocess(float[][][] inputs, float[][][] outputs, float[][] parameters) Renders one quantum.
-
Method Details
-
process
boolean process(float[][][] inputs, float[][][] outputs, float[][] parameters) Renders one quantum.
Parameters
-
inputs: the mixed input of each input, per channel -
outputs: the output to fill, per output and channel -
parameters: the value of each declared parameter, in declaration order
Returns
true to keep processing; false to have the node output silence from now on, as a worklet does once its processor stops answering true
-
-