Constructor
new AudioGraphProcessor(wasmJSAPI, inputChannelLayout, outputChannelLayout, maxNumberOfFrames, sampleRate)
AudioGraphProcessor constructor.
Parameters:
Name | Type | Description |
---|---|---|
wasmJSAPI |
WASMJSAPI | An instance of WASMJSAPI. |
inputChannelLayout |
Array | The input channel layout for the audio graph. E.g. [2] means ones stereo bus, [2, 1] means a stereo and a mono audio buses. |
outputChannelLayout |
Array | The output channel layout for the audio graph. E.g. [2] means ones stereo bus, [2, 1] means a stereo and a mono audio buses. |
maxNumberOfFrames |
Number | Max number of frames that the graph will be able to process. |
sampleRate |
Number | Sample rate. |
- Source:
Methods
destruct()
AudioGraphProcessor destructor. Deallocates all objects.
- Source:
processGraph(inputs, outputs, audioGraph) → {Boolean}
Processes audio from the AudioWorkletNode.
Parameters:
Name | Type | Description |
---|---|---|
inputs |
Array | Audio inputs. |
outputs |
Array | Audio outputs. |
audioGraph |
AudioGraph | The audio graph to process. |
- Source:
Returns:
True if the graph was processed successfully, false otherwise.
- Type
- Boolean