FMOD_DSP_PROCESS_OPERATION

FMOD Studio API

Firelight Technologies FMOD Studio API

FMOD_DSP_PROCESS_OPERATION

Operation type for FMOD_DSP_PROCESS_CALLBACK.

C/C++ Syntax

typedef enum {
  FMOD_DSP_PROCESS_PERFORM,
  FMOD_DSP_PROCESS_QUERY
} FMOD_DSP_PROCESS_OPERATION;

JavaScript Syntax

FMOD.DSP_PROCESS_PERFORM
FMOD.DSP_PROCESS_QUERY

Values

FMOD_DSP_PROCESS_PERFORM

Process the incoming audio in 'inbufferarray' and output to 'outbufferarray'.

FMOD_DSP_PROCESS_QUERY

The DSP is being queried for the expected output format and whether it needs to process audio or should be bypassed. The function should return FMOD_OK, or FMOD_ERR_DSP_DONTPROCESS or FMOD_ERR_DSP_SILENCE if audio can pass through unprocessed. See remarks for more. If audio is to be processed, 'outbufferarray' must be filled with the expected output format, channel count and mask.

Remarks

A process callback will be called twice per mix for a DSP unit. Once with the FMOD_DSP_PROCESS_QUERY command, then conditionally, FMOD_DSP_PROCESS_PERFORM.
FMOD_DSP_PROCESS_QUERY is to be handled only by filling out the outputarray information, and returning a relevant return code.
It should not really do any logic besides checking and returning one of the following codes:
- FMOD_OK - Meaning yes, it should execute the dsp process function with FMOD_DSP_PROCESS_PERFORM
- FMOD_ERR_DSP_DONTPROCESS - Meaning no, it should skip the process function and not call it with FMOD_DSP_PROCESS_PERFORM.
- FMOD_ERR_DSP_SILENCE - Meaning no, it should skip the process function and not call it with FMOD_DSP_PROCESS_PERFORM, AND, tell the signal chain to follow that it is now idle, so that no more processing happens down the chain.
If audio is to be processed, 'outbufferarray' must be filled with the expected output format, channel count and mask. Mask can be 0.

FMOD_DSP_PROCESS_PROCESS is to be handled by reading the data from the input, processing it, and writing it to the output. Always write to the output buffer and fill it fully to avoid unpredictable audio output.
Always return FMOD_OK, the return value is ignored from the process stage.

See Also




Version 1.10.03 Built on Feb 1, 2018