FMOD Engine User Manual 2.03
An interface that manages DSP plug-ins.
For more information on creating and using DSP plug-ins, please refer to the Plug-in DSP API Guide.
System:
Parameter API:
General:
DSP create callback.Functions:
FMOD_DSP_ALLOC_FUNC.Complex number structure.
typedef struct FMOD_COMPLEX {
float real;
float imag;
} FMOD_COMPLEX;
See Also: FMOD_DSP_STATE_FUNCTIONS, FMOD_DSP_STATE_DFT_FUNCTIONS
Function to allocate memory using the FMOD memory system.
void * F_CALL FMOD_DSP_ALLOC_FUNC(
unsigned int size,
FMOD_MEMORY_TYPE type,
const char *sourcestr
);
Allocation size.
Implementation Detail:
This function is a wrapper used by the system level allocator and can be called from any DSP instance. Returns a pointer to a region of memory with the requested size, or 0 on a failure.
See Also: FMOD_DSP_STATE, FMOD_DSP_REALLOC_FUNC, FMOD_DSP_FREE_FUNC
Structure for input and output buffers.
typedef struct FMOD_DSP_BUFFER_ARRAY {
int numbuffers;
int *buffernumchannels;
FMOD_CHANNELMASK *bufferchannelmask;
float **buffers;
FMOD_SPEAKERMODE speakermode;
} FMOD_DSP_BUFFER_ARRAY;
buffers.buffers property.This structure is used for reading and writing sample data in the FMOD_DSP_PROCESS_CALLBACK.
Example:
The following example demonstrates how to traverse a buffer array to generate a square wave:
int numchannels = outbufferarray[0].buffernumchannels[0];
float *output = outbufferarray[0].buffers[0];
bool pos = false;
int step = 0;
for (unsigned int sample = 0; sample < length; sample++)
{
for (int channel = 0; channel < numchannels; channel++)
{
output[sample * numchannels + channel] = pos ? 1.0f : -1.0f;
}
if (step++ % 32 == 0)
{
pos = !pos;
}
}
See Also: FMOD_DSP_DESCRIPTION
DSP create callback.
This callback is called when you create a DSP unit instance of this type.
FMOD_RESULT F_CALL FMOD_DSP_CREATE_CALLBACK(
FMOD_DSP_STATE *dsp_state
);
Invoked by:
Implementation Detail:
This callback is typically where memory is allocated and DSP specific variables are initialized.
If a user re-uses a DSP unit instead of releasing it and creating a new one, it may be useful to implement FMOD_DSP_RESET_CALLBACK to reset any variables or buffers when the user calls DSP::reset.
See Also: FMOD_DSP_DESCRIPTION, System::createDSP, System::createDSPByType, System::createDSPByPlugin, FMOD_DSP_RESET_CALLBACK, FMOD_DSP_RELEASE_CALLBACK
DSP description.
This description structure allows you to define all functionality required for a DSP unit when writing a DSP plug-in.
typedef struct FMOD_DSP_DESCRIPTION {
unsigned int pluginsdkversion;
char name[32];
unsigned int version;
int numinputbuffers;
int numoutputbuffers;
FMOD_DSP_CREATE_CALLBACK create;
FMOD_DSP_RELEASE_CALLBACK release;
FMOD_DSP_RESET_CALLBACK reset;
FMOD_DSP_READ_CALLBACK read;
FMOD_DSP_PROCESS_CALLBACK process;
FMOD_DSP_SETPOSITION_CALLBACK setposition;
int numparameters;
FMOD_DSP_PARAMETER_DESC **paramdesc;
FMOD_DSP_SETPARAM_FLOAT_CALLBACK setparameterfloat;
FMOD_DSP_SETPARAM_INT_CALLBACK setparameterint;
FMOD_DSP_SETPARAM_BOOL_CALLBACK setparameterbool;
FMOD_DSP_SETPARAM_DATA_CALLBACK setparameterdata;
FMOD_DSP_GETPARAM_FLOAT_CALLBACK getparameterfloat;
FMOD_DSP_GETPARAM_INT_CALLBACK getparameterint;
FMOD_DSP_GETPARAM_BOOL_CALLBACK getparameterbool;
FMOD_DSP_GETPARAM_DATA_CALLBACK getparameterdata;
FMOD_DSP_SHOULDIPROCESS_CALLBACK shouldiprocess;
void *userdata;
FMOD_DSP_SYSTEM_REGISTER_CALLBACK sys_register;
FMOD_DSP_SYSTEM_DEREGISTER_CALLBACK sys_deregister;
FMOD_DSP_SYSTEM_MIX_CALLBACK sys_mix;
} FMOD_DSP_DESCRIPTION;
process callback. Use in conjunction with shouldiprocess to determine whether read should continue to be called. (FMOD_DSP_READ_CALLBACK)read callback if any channel format changes occur between input and output. This also replaces shouldiprocess and should return an error if the effect is to be bypassed. (FMOD_DSP_PROCESS_CALLBACK)read should continue to be called. You can detect if inputs are idle and return FMOD_OK to process or any other error code to avoid processing the effect. Use a countdown timer to allow effect tails to process before idling. If process is used instead, then read and shouldiprocess are not necessary. (FMOD_DSP_SHOULDIPROCESS_CALLBACK)There are 2 different ways to change a parameter in this architecture.
One is to use DSP::setParameterFloat / DSP::setParameterInt / DSP::setParameterBool / DSP::setParameterData. This is platform independent and is dynamic, so new unknown plug-ins can have their parameters enumerated and used.
The other is to use DSP::showConfigDialog. This is platform specific and requires a GUI, and will display a dialog box to configure the plug-in.
Implementation Detail:
All function pointers assigned to callbacks must remain valid until the plug-in is unloaded with System::unloadPlugin.
The name is stored as a UTF8 string. You can assign the plug-in's name in like so:
FMOD_DSP_DESCRIPTION desc = {};
strncpy(desc.name, "My DSP", sizeof(desc.name));
var desc = FMOD.DSP_DESCRIPTION();
desc.name = "My DSP";
See Also: System::createDSP, DSP::setParameterFloat, DSP::setParameterInt, DSP::setParameterBool, DSP::setParameterData, FMOD_DSP_STATE, FMOD_DSP_CREATE_CALLBACK, FMOD_DSP_RELEASE_CALLBACK, FMOD_DSP_RESET_CALLBACK, FMOD_DSP_READ_CALLBACK, FMOD_DSP_PROCESS_CALLBACK, FMOD_DSP_SETPOSITION_CALLBACK, FMOD_DSP_PARAMETER_DESC, FMOD_DSP_SETPARAM_FLOAT_CALLBACK, FMOD_DSP_SETPARAM_INT_CALLBACK, FMOD_DSP_SETPARAM_BOOL_CALLBACK, FMOD_DSP_SETPARAM_DATA_CALLBACK, FMOD_DSP_GETPARAM_FLOAT_CALLBACK, FMOD_DSP_GETPARAM_INT_CALLBACK, FMOD_DSP_GETPARAM_BOOL_CALLBACK, FMOD_DSP_GETPARAM_DATA_CALLBACK, FMOD_DSP_SHOULDIPROCESS_CALLBACK, FMOD_DSP_SYSTEM_REGISTER_CALLBACK, FMOD_DSP_SYSTEM_DEREGISTER_CALLBACK, FMOD_DSP_SYSTEM_MIX_CALLBACK
Function for performing an FFT on a real signal.
FMOD_RESULT F_CALL FMOD_DSP_DFT_FFTREAL_FUNC(
FMOD_DSP_STATE *dsp_state,
int size,
const float *signal,
FMOD_COMPLEX* dft,
const float *window,
int signalhop
);
The length of the signal frame.
Input signal frame to perform DFT on.
The output DFT result. (FMOD_COMPLEX)
Window buffer for smoothing input signal prior to analysis. Must be the same length as the input signal. Example window types can be found in FMOD_DSP_FFT_WINDOW.
The number of samples between signal frames.
Implementation Detail:
Calling this function will append an FMOD_DSP_FFT effect to the DSP's output if there isn't one already.
See Also: FMOD_DSP_STATE, FMOD_DSP_DFT_IFFTREAL_FUNC, FFT
Function for performing an inverse FFT to get a real signal.
FMOD_RESULT F_CALL FMOD_DSP_DFT_IFFTREAL_FUNC(
FMOD_DSP_STATE *dsp_state,
int size,
const FMOD_COMPLEX *dft,
float* signal,
const float *window,
int signalhop
);
The length of the signal frame.
The previous input DFT result calculated from FMOD_DSP_DFT_FFTREAL_FUNC. (FMOD_COMPLEX)
Output signal to perform IFFT on.
Window buffer for smoothing input signal prior to analysis. Must be the same length as the input signal. Example window types can be found in FMOD_DSP_FFT_WINDOW.
The number of samples between signal frames.
Implementation Detail:
Calling this function will append an FMOD_DSP_FFT effect to the DSP's output if there isn't one already.
See Also: FMOD_DSP_STATE, FMOD_DSP_DFT_FFTREAL_FUNC
Function to free memory allocated with FMOD_DSP_ALLOC_FUNC.
void F_CALL FMOD_DSP_FREE_FUNC(
void *ptr,
FMOD_MEMORY_TYPE type,
const char *sourcestr
);
Implementation Detail:
This function is a wrapper used by the system level allocator and can be called from any DSP instance.
See Also: FMOD_DSP_STATE, FMOD_DSP_ALLOC_FUNC, FMOD_DSP_REALLOC_FUNC
Function to query the number of samples the mixer will process each mix.
FMOD_RESULT F_CALL FMOD_DSP_GETBLOCKSIZE_FUNC(
FMOD_DSP_STATE *dsp_state,
unsigned int *blocksize
);
Maximum number of decompressed PCM samples the DSP unit can handle.
Implementation Detail:
DSPs are requested to process blocks of varying length up to this size.
See Also: FMOD_DSP_STATE, System::getDSPBufferSize
Function to get the clock of the current DSP, as well as the subset of the input buffer that contains the signal.
FMOD_RESULT F_CALL FMOD_DSP_GETCLOCK_FUNC(
FMOD_DSP_STATE *dsp_state,
unsigned long long *clock,
unsigned int *offset,
unsigned int *length
);
DSP clock value for the DSP node.
The start offset of the audio data inside the input buffer.
The length of the audio data inside the input buffer.
Implementation Detail:
FMOD mix blocks are block aligned, so when a delay such as ChannelControl::setDelay is used the audio may start and end part way through the buffer. The offset is where the audio starts inside the buffer, and the length is how long after the offset the audio continues for.
See Also: FMOD_DSP_STATE
Callback for getting the absolute listener attributes set via the API.
FMOD_RESULT F_CALL FMOD_DSP_GETLISTENERATTRIBUTES_FUNC(
FMOD_DSP_STATE *dsp_state,
int *numlisteners,
FMOD_3D_ATTRIBUTES *attributes
);
Implementation Detail:
Returned as left-handed coordinates.
See Also: FMOD_DSP_STATE
Get boolean parameter callback.
This callback is called when the user wants to get a boolean parameter value from a DSP unit.
FMOD_RESULT F_CALL FMOD_DSP_GETPARAM_BOOL_CALLBACK(
FMOD_DSP_STATE *dsp_state,
int index,
FMOD_BOOL *value,
char *valuestr
);
Parameter value.
Invoked by:
See Also: FMOD_DSP_DESCRIPTION, FMOD_DSP_SETPARAM_BOOL_CALLBACK
Get data parameter callback.
This callback is called when the user wants to get a data parameter value from a DSP unit.
FMOD_RESULT F_CALL FMOD_DSP_GETPARAM_DATA_CALLBACK(
FMOD_DSP_STATE *dsp_state,
int index,
void **data,
unsigned int *length,
char *valuestr
);
data.Invoked by:
See Also: DSP::setParameterData, FMOD_DSP_DESCRIPTION, FMOD_DSP_SETPARAM_DATA_CALLBACK
Get float parameter callback.
This callback is called when the user wants to get a floating point parameter value from a DSP unit.
FMOD_RESULT F_CALL FMOD_DSP_GETPARAM_FLOAT_CALLBACK(
FMOD_DSP_STATE *dsp_state,
int index,
float *value,
char *valuestr
);
Invoked by:
See Also: FMOD_DSP_DESCRIPTION, FMOD_DSP_SETPARAM_FLOAT_CALLBACK
Get integer parameter callback.
This callback is called when the user wants to get an integer parameter value from a DSP unit.
FMOD_RESULT F_CALL FMOD_DSP_GETPARAM_INT_CALLBACK(
FMOD_DSP_STATE *dsp_state,
int index,
int *value,
char *valuestr
);
Invoked by:
See Also: DSP::setParameterInt, FMOD_DSP_DESCRIPTION, FMOD_DSP_SETPARAM_INT_CALLBACK
Length in bytes of the buffer pointed to by the valuestr argument of FMOD_DSP_GETPARAM_XXXX_CALLBACK functions.
#define FMOD_DSP_GETPARAM_VALUESTR_LENGTH 32
See Also: FMOD_DSP_GETPARAM_FLOAT_CALLBACK, FMOD_DSP_GETPARAM_INT_CALLBACK, FMOD_DSP_GETPARAM_BOOL_CALLBACK, FMOD_DSP_GETPARAM_DATA_CALLBACK
Function to query the system sample rate.
FMOD_RESULT F_CALL FMOD_DSP_GETSAMPLERATE_FUNC(
FMOD_DSP_STATE *dsp_state,
int *rate
);
The system sample rate.
See Also: FMOD_DSP_STATE
Function to query the system speaker modes.
FMOD_RESULT F_CALL FMOD_DSP_GETSPEAKERMODE_FUNC(
FMOD_DSP_STATE *dsp_state,
FMOD_SPEAKERMODE *speakermode_mixer,
FMOD_SPEAKERMODE *speakermode_output
);
Implementation detail:
If speakermode_mixer and speakermode_output are different then the System is downmixing or upmixing to the speakermode_output format.
See Also: FMOD_DSP_STATE, Upmix/Downmix Behavior
Function to get the user data attached to this DSP.
FMOD_RESULT F_CALL FMOD_DSP_GETUSERDATA_FUNC(
FMOD_DSP_STATE *dsp_state,
void **userdata
);
See Also: FMOD_DSP_STATE
Function to write to the FMOD logging system.
void F_CALL FMOD_DSP_LOG_FUNC(
FMOD_DEBUG_FLAGS level,
const char *file,
int line,
const char *function,
const char *str,
...
);
See Also: FMOD_DSP_STATE
DSP metering info.
typedef struct FMOD_DSP_METERING_INFO {
int numsamples;
float peaklevel[32];
float rmslevel[32];
short numchannels;
} FMOD_DSP_METERING_INFO;
Peak level per channel.
Rms level per channel.
See Also: FMOD_SPEAKER, DSP::getMeteringInfo
Function to calculate distance attenuation.
FMOD_RESULT F_CALL FMOD_DSP_PAN_GETROLLOFFGAIN_FUNC(
FMOD_DSP_STATE *dsp_state,
FMOD_DSP_PAN_3D_ROLLOFF_TYPE rolloff,
float distance,
float mindistance,
float maxdistance,
float *gain
);
The distance from the DSP's position.
Distance from the source where attenuation begins.
Distance from the source where attenuation ends.
Gain modifier applied to signal at provided distance.
See Also: FMOD_DSP_STATE
Function to calculate a mix matrix that downmixes the source speaker mode to mono.
FMOD_RESULT F_CALL FMOD_DSP_PAN_SUMMONOMATRIX_FUNC(
FMOD_DSP_STATE *dsp_state,
FMOD_SPEAKERMODE sourceSpeakerMode,
float lowFrequencyGain,
float overallGain,
float *matrix
);
Gain modifier to apply just to the LFE channel.
Gain modifier to apply to each channel, including the LFE channel.
See Also: FMOD_DSP_STATE, System::getSpeakerModeChannels, ChannelControl::setMixMatrix, Upmix/Downmix Behavior
Function to calculate a mix matrix that upmixes from mono to the target speaker mode.
FMOD_RESULT F_CALL FMOD_DSP_PAN_SUMMONOTOSURROUNDMATRIX_FUNC(
FMOD_DSP_STATE *dsp_state,
FMOD_SPEAKERMODE targetSpeakerMode,
float direction,
float extent,
float lowFrequencyGain,
float overallGain,
int matrixHop,
float *matrix
);
Angle from center point of panning circle where 0 is front center and -180 or +180 is rear speakers center point.
The amount the signal will be spread across the panning circle relative to direction, where 0 is not at all and 360 is spread between all speakers.
Gain modifier to apply just to the LFE channel.
Gain modifier to apply to each channel, including the LFE channel.
The number of source channels in the matrix.
See Also: FMOD_DSP_STATE, ChannelControl::setMixMatrix, Upmix/Downmix Behavior
Function to calculate a mix matrix that downmixes from the source speaker mode to stereo.
FMOD_RESULT F_CALL FMOD_DSP_PAN_SUMSTEREOMATRIX_FUNC(
FMOD_DSP_STATE *dsp_state,
FMOD_SPEAKERMODE sourceSpeakerMode,
float pan,
float lowFrequencyGain,
float overallGain,
int matrixHop,
float *matrix
);
The amount the signal will be spread across the left and right channels, where -100 is 100% left, and 100 is 100% right.
Gain modifier to apply just to the LFE channel.
Gain modifier to apply to each channel, including the LFE channel.
The number of source channels in the matrix.
See Also: FMOD_DSP_STATE, ChannelControl::setMixMatrix, Upmix/Downmix Behavior
Function to calculate a mix matrix that upmixes from stereo to the target speaker mode.
FMOD_RESULT F_CALL FMOD_DSP_PAN_SUMSTEREOTOSURROUNDMATRIX_FUNC(
FMOD_DSP_STATE *dsp_state,
FMOD_SPEAKERMODE targetSpeakerMode,
float direction,
float extent,
float rotation,
float lowFrequencyGain,
float overallGain,
int matrixHop,
float *matrix
);
Angle from center point of panning circle where 0 is front center and -180 or +180 is rear speakers center point.
The amount the signal will be spread across the panning circle relative to direction, where 0 is not at all and 360 is spread between all speakers.
The rotation of the channels from their original mapping, contained within the extent.
Gain modifier to apply just to the LFE channel.
Gain modifier to apply to each channel, including the LFE channel.
The number of source channels in the matrix.
See Also: FMOD_DSP_STATE, ChannelControl::setMixMatrix
Function to calculate a mix matrix that upmixes or downmixes from the source speaker mode to the target speaker mode.
FMOD_RESULT F_CALL FMOD_DSP_PAN_SUMSURROUNDMATRIX_FUNC(
FMOD_DSP_STATE *dsp_state,
FMOD_SPEAKERMODE sourceSpeakerMode,
FMOD_SPEAKERMODE targetSpeakerMode,
float direction,
float extent,
float rotation,
float lowFrequencyGain,
float overallGain,
int matrixHop,
float *matrix,
FMOD_DSP_PAN_SURROUND_FLAGS flags
);
Angle from center point of panning circle where 0 is front center and -180 or +180 is rear speakers center point.
The amount the signal will be spread across the panning circle relative to direction, where 0 is not at all and 360 is spread between all speakers.
The rotation of the channels from their original mapping, contained within the extent.
Gain modifier to apply just to the LFE channel.
Gain modifier to apply to each channel, including the LFE channel.
The number of source channels in the matrix.
See Also: FMOD_DSP_STATE, ChannelControl::setMixMatrix
Flags for the FMOD_DSP_PAN_SUMSURROUNDMATRIX_FUNC function.
typedef enum FMOD_DSP_PAN_SURROUND_FLAGS {
FMOD_DSP_PAN_SURROUND_DEFAULT,
FMOD_DSP_PAN_SURROUND_ROTATION_NOT_BIASED
} FMOD_DSP_PAN_SURROUND_FLAGS;
See Also: FMOD_DSP_STATE_PAN_FUNCTIONS
3D attributes data structure.
typedef struct FMOD_DSP_PARAMETER_3DATTRIBUTES {
FMOD_3D_ATTRIBUTES relative;
FMOD_3D_ATTRIBUTES absolute;
} FMOD_DSP_PARAMETER_3DATTRIBUTES;
The FMOD::Studio::System sets this parameter automatically when an FMOD::Studio::EventInstance position changes. However, if you are using the core FMOD::System and not the FMOD::Studio::System, you must set this DSP parameter explicitly.
Attributes must use a coordinate system with the positive Y axis being up and the positive X axis being right. The FMOD Engine converts passed-in coordinates to left-handed for the plug-in if the system was initialized with the FMOD_INIT_3D_RIGHTHANDED flag.
When using a listener attenuation position, the direction of the relative attributes will be relative to the listener position and the length will be the distance to the attenuation position.
See Also: FMOD_DSP_PARAMETER_DATA_TYPE, FMOD_DSP_PARAMETER_DESC, Studio::System::setListenerAttributes, Controlling a Spatializer DSP.
3D attributes data structure for multiple listeners.
typedef struct FMOD_DSP_PARAMETER_3DATTRIBUTES_MULTI {
int numlisteners;
FMOD_3D_ATTRIBUTES relative[FMOD_MAX_LISTENERS];
float weight[FMOD_MAX_LISTENERS];
FMOD_3D_ATTRIBUTES absolute;
} FMOD_DSP_PARAMETER_3DATTRIBUTES_MULTI;
The FMOD::Studio::System sets this parameter automatically when an FMOD::Studio::EventInstance position changes. However, if you are using the core API's FMOD::System and not the FMOD::Studio::System, you must set this DSP parameter explicitly.
Attributes must use a coordinate system with the positive Y axis being up and the positive X axis being right. The FMOD Engine converts passed in coordinates to left-handed for the plug-in if the System was initialized with the FMOD_INIT_3D_RIGHTHANDED flag.
When using a listener attenuation position, the direction of the relative attributes will be relative to the listener position and the length will be the distance to the attenuation position.
See Also: FMOD_DSP_PARAMETER_DATA_TYPE, FMOD_DSP_PARAMETER_DESC, Studio::System::setListenerAttributes, Controlling a Spatializer DSP.
Attenuation range parameter data structure.
typedef struct FMOD_DSP_PARAMETER_ATTENUATION_RANGE {
float min;
float max;
} FMOD_DSP_PARAMETER_ATTENUATION_RANGE;
The FMOD::Studio::System will set this parameter automatically if an FMOD::Studio::EventInstance min or max distance changes.
See Also: FMOD_DSP_PARAMETER_DATA_TYPE, FMOD_DSP_PARAMETER_DESC
Data parameter types.
typedef enum FMOD_DSP_PARAMETER_DATA_TYPE {
FMOD_DSP_PARAMETER_DATA_TYPE_USER = 0,
FMOD_DSP_PARAMETER_DATA_TYPE_OVERALLGAIN = -1,
FMOD_DSP_PARAMETER_DATA_TYPE_3DATTRIBUTES = -2,
FMOD_DSP_PARAMETER_DATA_TYPE_SIDECHAIN = -3,
FMOD_DSP_PARAMETER_DATA_TYPE_FFT = -4,
FMOD_DSP_PARAMETER_DATA_TYPE_3DATTRIBUTES_MULTI = -5,
FMOD_DSP_PARAMETER_DATA_TYPE_ATTENUATION_RANGE = -6,
FMOD_DSP_PARAMETER_DATA_TYPE_DYNAMIC_RESPONSE = -7,
FMOD_DSP_PARAMETER_DATA_TYPE_FINITE_LENGTH = -8
} FMOD_DSP_PARAMETER_DATA_TYPE;
See Also: FMOD_DSP_PARAMETER_DESC_DATA, DSP::getParameterData, DSP::setParameterData
Base structure for DSP parameter descriptions.
typedef struct FMOD_DSP_PARAMETER_DESC {
FMOD_DSP_PARAMETER_TYPE type;
char name[16];
char label[16];
const char *description;
union
{
FMOD_DSP_PARAMETER_DESC_FLOAT floatdesc;
FMOD_DSP_PARAMETER_DESC_INT intdesc;
FMOD_DSP_PARAMETER_DESC_BOOL booldesc;
FMOD_DSP_PARAMETER_DESC_DATA datadesc;
}
} FMOD_DSP_PARAMETER_DESC;
See Also: System::createDSP, DSP::setParameterFloat, DSP::getParameterFloat, DSP::setParameterInt, DSP::getParameterInt, DSP::setParameterBool, DSP::getParameterBool, DSP::setParameterData, DSP::getParameterData, FMOD_DSP_PARAMETER_DESC_FLOAT, FMOD_DSP_PARAMETER_DESC_INT, FMOD_DSP_PARAMETER_DESC_BOOL, FMOD_DSP_PARAMETER_DESC_DATA, FMOD_DSP_PARAMETER_DATA_TYPE
Boolean parameter description.
typedef struct FMOD_DSP_PARAMETER_DESC_BOOL {
FMOD_BOOL defaultval;
const char* const* valuenames;
} FMOD_DSP_PARAMETER_DESC_BOOL;
Default parameter value.
See Also: System::createDSP, DSP::setParameterBool, DSP::getParameterBool, FMOD_DSP_PARAMETER_DESC
Data parameter description.
typedef struct FMOD_DSP_PARAMETER_DESC_DATA {
int datatype;
} FMOD_DSP_PARAMETER_DESC_DATA;
See Also: System::createDSP, DSP::setParameterData, DSP::getParameterData, FMOD_DSP_PARAMETER_DATA_TYPE, FMOD_DSP_PARAMETER_DESC
Float parameter description.
typedef struct FMOD_DSP_PARAMETER_DESC_FLOAT {
float min;
float max;
float defaultval;
FMOD_DSP_PARAMETER_FLOAT_MAPPING mapping;
} FMOD_DSP_PARAMETER_DESC_FLOAT;
See Also: System::createDSP, DSP::setParameterFloat, DSP::getParameterFloat, FMOD_DSP_PARAMETER_DESC
Integer parameter description.
typedef struct FMOD_DSP_PARAMETER_DESC_INT {
int min;
int max;
int defaultval;
FMOD_BOOL goestoinf;
const char* const* valuenames;
} FMOD_DSP_PARAMETER_DESC_INT;
Whether the last value represents infinity.
See Also: System::createDSP, DSP::setParameterInt, DSP::getParameterInt, FMOD_DSP_PARAMETER_DESC
Dynamic response data structure.
typedef struct FMOD_DSP_PARAMETER_DYNAMIC_RESPONSE {
int numchannels;
float rms[32];
} FMOD_DSP_PARAMETER_DYNAMIC_RESPONSE;
The RMS (Root Mean Square) averaged gain factor applied per channel for the last processed block of audio.
See Also: FMOD_DSP_PARAMETER_DATA_TYPE, FMOD_DSP_PARAMETER_DESC, FMOD_DSP_PARAMETER_DATA_TYPE_DYNAMIC_RESPONSE
FFT parameter data structure.
typedef struct FMOD_DSP_PARAMETER_FFT {
int length;
int numchannels;
float *spectrum[32];
} FMOD_DSP_PARAMETER_FFT;
Notes on the spectrum data member. Values inside the float buffer are typically between 0 and 1.0.
Each top level array represents one PCM channel of data.
Address data as spectrum[channel][bin]. A bin is 1 fft window entry.
Only read/display half of the buffer typically for analysis as the 2nd half is usually the same data reversed due to the nature of the way FFT works.
See Also: FMOD_DSP_PARAMETER_DATA_TYPE, FMOD_DSP_PARAMETER_DESC, FMOD_DSP_PARAMETER_DATA_TYPE_FFT, FMOD_DSP_TYPE, FMOD_DSP_FFT
Length data structure.
typedef struct FMOD_DSP_PARAMETER_FINITE_LENGTH
{
FMOD_BOOL finite;
} FMOD_DSP_PARAMETER_FINITE_LENGTH;
Whether the DSP's playback length is finite.
This data structure is used by the Studio API to detect whether the DSP will stop by itself or continue playing forever.
See Also: FMOD_DSP_PARAMETER_DATA_TYPE, FMOD_DSP_PARAMETER_DESC, FMOD_DSP_PARAMETER_DATA_TYPE_FINITE_LENGTH
Structure to define a mapping for a DSP unit's float parameter.
typedef struct FMOD_DSP_PARAMETER_FLOAT_MAPPING {
FMOD_DSP_PARAMETER_FLOAT_MAPPING_TYPE type;
FMOD_DSP_PARAMETER_FLOAT_MAPPING_PIECEWISE_LINEAR piecewiselinearmapping;
} FMOD_DSP_PARAMETER_FLOAT_MAPPING;
See Also: FMOD_DSP_PARAMETER_FLOAT_MAPPING_TYPE, FMOD_DSP_PARAMETER_FLOAT_MAPPING_PIECEWISE_LINEAR, FMOD_DSP_PARAMETER_DESC_FLOAT
Structure to define a piecewise linear mapping.
typedef struct FMOD_DSP_PARAMETER_FLOAT_MAPPING_PIECEWISE_LINEAR {
int numpoints;
float *pointparamvalues;
float *pointpositions;
} FMOD_DSP_PARAMETER_FLOAT_MAPPING_PIECEWISE_LINEAR;
See Also: FMOD_DSP_PARAMETER_FLOAT_MAPPING_TYPE, FMOD_DSP_PARAMETER_FLOAT_MAPPING
DSP float parameter mappings. These determine how values are mapped across dials and automation curves.
typedef enum FMOD_DSP_PARAMETER_FLOAT_MAPPING_TYPE {
FMOD_DSP_PARAMETER_FLOAT_MAPPING_TYPE_LINEAR,
FMOD_DSP_PARAMETER_FLOAT_MAPPING_TYPE_AUTO,
FMOD_DSP_PARAMETER_FLOAT_MAPPING_TYPE_PIECEWISE_LINEAR
} FMOD_DSP_PARAMETER_FLOAT_MAPPING_TYPE;
FMOD_DSP_PARAMETER_FLOAT_MAPPING_TYPE_AUTO generates a mapping based on range and units. For example, if the units are in Hertz and the range is with-in the audio spectrum, a Bark scale will be chosen. Logarithmic scales may also be generated for ranges above zero spanning several orders of magnitude.
See Also: FMOD_DSP_PARAMETER_FLOAT_MAPPING
Overall gain parameter data structure.
typedef struct FMOD_DSP_PARAMETER_OVERALLGAIN {
float linear_gain;
float linear_gain_additive;
} FMOD_DSP_PARAMETER_OVERALLGAIN;
This parameter is read by the system to determine the effect's gain for voice virtualization.
See Also: FMOD_DSP_PARAMETER_DATA_TYPE, FMOD_DSP_PARAMETER_DESC, Virtual Voice System.
Side chain parameter data structure.
typedef struct FMOD_DSP_PARAMETER_SIDECHAIN {
FMOD_BOOL sidechainenable;
} FMOD_DSP_PARAMETER_SIDECHAIN;
Whether sidechains are enabled.
See Also: FMOD_DSP_PARAMETER_DATA_TYPE, FMOD_DSP_PARAMETER_DESC
DSP parameter types.
typedef enum FMOD_DSP_PARAMETER_TYPE {
FMOD_DSP_PARAMETER_TYPE_FLOAT,
FMOD_DSP_PARAMETER_TYPE_INT,
FMOD_DSP_PARAMETER_TYPE_BOOL,
FMOD_DSP_PARAMETER_TYPE_DATA,
FMOD_DSP_PARAMETER_TYPE_MAX
} FMOD_DSP_PARAMETER_TYPE;
See Also: FMOD_DSP_PARAMETER_DESC
Process callback.
This callback receives an input signal, and allows the user to filter or process the data and write it to the output. This is an alternative to the FMOD_DSP_READ_CALLBACK and FMOD_DSP_SHOULDIPROCESS_CALLBACK.
FMOD_RESULT F_CALL FMOD_DSP_PROCESS_CALLBACK(
FMOD_DSP_STATE *dsp_state,
unsigned int length,
const FMOD_DSP_BUFFER_ARRAY *inbufferarray,
FMOD_DSP_BUFFER_ARRAY *outbufferarray,
FMOD_BOOL inputsidle,
FMOD_DSP_PROCESS_OPERATION op
);
Length of the incoming and outgoing buffer.
This is true if no audio is being fed to this unit.
Invoked by:
For a process update to be called it would have to be enabled, and this is done with DSP::setActive. If ChannelControl::addDSP is used the unit is automatically set to active.
Implementation Detail:
This callback can be used to specify the output channel format at runtime rather than create time, and also supports multiple input/output buffers.
This callback will be called twice per mix as it has a dual purpose. Once will be with op = FMOD_DSP_PROCESS_QUERY, and then depending on the return value of the query, if it is FMOD_OK it will call it again with FMOD_DSP_PROCESS_PERFORM.
Return FMOD_ERR_DSP_SILENCE if the effect is generating silence, so FMOD's mixer can optimize the signal path and not process it any more.
Example:
The following example demonstrates how to copy the input buffer to the output buffer at half volume inside a DSP process callback:
FMOD_RESULT F_CALL Process(FMOD_DSP_STATE *dsp_state, unsigned int length, const FMOD_DSP_BUFFER_ARRAY *inbufferarray, FMOD_DSP_BUFFER_ARRAY *outbufferarray, FMOD_BOOL inputsidle, FMOD_DSP_PROCESS_OPERATION op)
{
if (op == FMOD_DSP_PROCESS_QUERY)
{
if (outbufferarray && inbufferarray)
{
if (outbufferarray[0].buffernumchannels[0] != inbufferarray[0].buffernumchannels[0])
{
FMOD_ERR_DSP_SILENCE;
}
}
if (inputsidle)
{
return FMOD_ERR_DSP_DONTPROCESS;
}
}
else
{
int numchannels = outbufferarray[0].buffernumchannels[0];
float *input = inbufferarray[0].buffers[0];
float *output = outbufferarray[0].buffers[0];
for (unsigned int sample = 0; sample < length; sample++)
{
for (int channel = 0; channel < numchannels; channel++)
{
output[sample * numchannels + channel] = input[sample * numchannels + channel] * 0.5f;
}
}
}
return FMOD_OK;
}
See Also: FMOD_DSP_READ_CALLBACK, FMOD_DSP_SHOULDIPROCESS_CALLBACK, FMOD_DSP_DESCRIPTION
Process operation type.
typedef enum FMOD_DSP_PROCESS_OPERATION {
FMOD_DSP_PROCESS_PERFORM,
FMOD_DSP_PROCESS_QUERY
} FMOD_DSP_PROCESS_OPERATION;
inbufferarray and output to outbufferarray.outbufferarray must be filled with the expected output format, channel count and mask.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 outbufferarray 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_PERFORM 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: FMOD_DSP_PROCESS_CALLBACK, FMOD_DSP_DESCRIPTION
DSP read callback.
This callback receives an input signal and allows the user of the plug-in to filter or process the data and write it to the output.
FMOD_RESULT F_CALL FMOD_DSP_READ_CALLBACK(
FMOD_DSP_STATE *dsp_state,
float *inbuffer,
float *outbuffer,
unsigned int length,
int inchannels,
int *outchannels
);
inchannels is greater than 1.outchannels is greater than 1.Length of the incoming and outgoing buffers.
inbuffer parameter. Example: 1 = mono, 2 = stereo, 6 = 5.1.outbuffer parameter. Example: 1 = mono, 2 = stereo, 6 = 5.1.Invoked by:
For a read update to be called it would have to be enabled, and this is done with DSP::setActive. If ChannelControl::addDSP is used the unit is automatically set to active.
Implementation Detail:
The range of -1 to 1 is a soft limit. In the case of the inbuffer it is not guaranteed to be in that range, and in the case of the outbuffer FMOD will accept values outside that range. However all values will be clamped to the range of -1 to 1 in the final mix.
This callback will not be called if the preceding FMOD_DSP_SHOULDIPROCESS_CALLBACK is returning FMOD_ERR_DSP_DONTPROCESS. Return FMOD_ERR_DSP_SILENCE if the effect is generating silence, so FMOD's mixer can optimize the signal path and not process it any more.
NOTE: Effects that do not stop processing via FMOD_DSP_SHOULDIPROCESS_CALLBACK may keep the signal chain alive when it is not desirable to do so. FMOD Studio events may return that they are still playing when they should be stopped.
Example:
The following example demonstrates how to copy the input buffer to the output buffer at half volume inside a DSP read callback:
FMOD_RESULT F_CALL Read(FMOD_DSP_STATE *dsp_state, float *inbuffer, float *outbuffer, unsigned int length, int inchannels, int *outchannels)
{
for (unsigned int sample = 0; sample < length; sample++)
{
for (int channel = 0; channel < inchannels; channel++)
{
outbuffer[sample * *outchannels + channel] = inbuffer[sample * inchannels + channel] * 0.5f;
}
}
return FMOD_OK;
}
See Also: FMOD_DSP_SHOULDIPROCESS_CALLBACK, FMOD_DSP_DESCRIPTION, DSP::setActive, FMOD_RESULT
Function to reallocate memory using the FMOD memory system.
void * F_CALL FMOD_DSP_REALLOC_FUNC(
void *ptr,
unsigned int size,
FMOD_MEMORY_TYPE type,
const char *sourcestr
);
Allocation size.
Implementation Detail:
This function is a wrapper used by the system level allocator and can be called from any DSP instance. Returns a pointer to a region of reallocated memory, or 0 on a failure.
See Also: FMOD_DSP_STATE, FMOD_DSP_ALLOC_FUNC, FMOD_DSP_FREE_FUNC
DSP release callback.
This callback is called when the user of the plug-in releases a DSP unit instance.
FMOD_RESULT F_CALL FMOD_DSP_RELEASE_CALLBACK(
FMOD_DSP_STATE *dsp_state
);
Invoked by:
Implementation Detail:
This callback is typically used to free any resources allocated during the course of the lifetime of the DSP instance or perform any shut down code needed to clean up the DSP unit.
See Also: FMOD_DSP_DESCRIPTION, FMOD_DSP_CREATE_CALLBACK
DSP reset callback.
This callback function is called to allow a DSP effect to reset its internal state.
FMOD_RESULT F_CALL FMOD_DSP_RESET_CALLBACK(
FMOD_DSP_STATE *dsp_state
);
Invoked by:
This callback is called on all plug-ins inside an event whenever the event is started (for example by Studio::EventInstance::start).
It is also useful if (for example) an effect is still holding audio data for a sound that has stopped, and is being relocated to a new sound. Resetting the unit would clear any buffers and get it ready for new sound data.
Note that this callback should not change any public parameters that are exposed via FMOD_DSP_DESCRIPTION::paramdesc, but should instead reset the internal state to match the public parameter values.
See Also: FMOD_DSP_DESCRIPTION
Set boolean parameter callback.
This callback is called when the user of the plug-in wants to set a boolean parameter for a DSP unit.
FMOD_RESULT F_CALL FMOD_DSP_SETPARAM_BOOL_CALLBACK(
FMOD_DSP_STATE *dsp_state,
int index,
FMOD_BOOL value
);
Parameter value.
Invoked by:
See Also: DSP::getParameterBool, FMOD_DSP_DESCRIPTION, FMOD_DSP_GETPARAM_BOOL_CALLBACK
Set data parameter callback.
This callback is called when the user of the plug-in wants to set a binary data parameter for a DSP unit.
FMOD_RESULT F_CALL FMOD_DSP_SETPARAM_DATA_CALLBACK(
FMOD_DSP_STATE *dsp_state,
int index,
void *data,
unsigned int length
);
length parameter.Size of the binary data parameter.
Certain data types are predefined by the system and can be specified via the FMOD_DSP_PARAMETER_DESC_DATA, see FMOD_DSP_PARAMETER_DATA_TYPE
Invoked by:
See Also: DSP::getParameterData, FMOD_DSP_DESCRIPTION, FMOD_DSP_GETPARAM_DATA_CALLBACK
Set float parameter callback.
This callback is called when the user wants to set a float parameter for a DSP unit.
FMOD_RESULT F_CALL FMOD_DSP_SETPARAM_FLOAT_CALLBACK(
FMOD_DSP_STATE *dsp_state,
int index,
float value
);
Invoked by:
Range checking is not needed. FMOD will clamp the incoming value to the specified min/max.
See Also: DSP::getParameterFloat, FMOD_DSP_DESCRIPTION, FMOD_DSP_GETPARAM_FLOAT_CALLBACK
Set integer parameter callback.
This callback is called when the user of the plug-in wants to set an integer parameter for a DSP unit.
FMOD_RESULT F_CALL FMOD_DSP_SETPARAM_INT_CALLBACK(
FMOD_DSP_STATE *dsp_state,
int index,
int value
);
Invoked by:
Range checking is not needed. FMOD will clamp the incoming value to the specified min/max.
See Also: DSP::setParameterInt, FMOD_DSP_DESCRIPTION, FMOD_DSP_GETPARAM_INT_CALLBACK
DSP set position callback.
This callback is called when the user of the plug-in wants to set a PCM position for a DSP.
FMOD_RESULT F_CALL FMOD_DSP_SETPOSITION_CALLBACK(
FMOD_DSP_STATE *dsp_state,
unsigned int pos
);
Target position in the audio signal. (FMOD_TIMEUNIT_PCM).
Invoked by:
This callback is typically used for DSP units that behave as an audio signal with a relative position. This type of callback is only called if the DSP has been played with System::playDSP.
See Also: FMOD_DSP_DESCRIPTION
DSP 'should I process?' callback.
This callback is called to allow you to tell the FMOD mixer whether the FMOD_DSP_READ_CALLBACK callback should be called or not. This can be used as an optimization to reduce CPU overhead.
FMOD_RESULT F_CALL FMOD_DSP_SHOULDIPROCESS_CALLBACK(
FMOD_DSP_STATE *dsp_state,
FMOD_BOOL inputsidle,
unsigned int length,
FMOD_CHANNELMASK inmask,
int inchannels,
FMOD_SPEAKERMODE speakermode
);
This is true if no audio is being fed to this unit.
Length of the incoming and outgoing buffer.
Invoked by:
Implementation Detail:
An example of an effect that would continue processing silence would be an echo or reverb effect that needs to play a tail sound until it fades out to silence. At that point it could return FMOD_ERR_DSP_SILENCE as well.
Typically inmask and speakermode parameters are not important to a plug-in unless it cares about speaker positioning. If it processes any data regardless of channel format coming in, it can safely ignore these two parameters.
If the effect produces silence such as when it is receiving no signal, then FMOD_ERR_DSP_SILENCE can be returned in the FMOD_DSP_SHOULDIPROCESS_CALLBACK callback. If the effect does not modify the sound in any way with the current effect parameter settings, then FMOD_ERR_DSP_DONTPROCESS can be returned.
Either of these return values will cause FMOD's mixer to skip the FMOD_DSP_READ_CALLBACK callback.
NOTE: Effects that do not stop processing may keep the signal chain alive when it is not desirable. In the case of FMOD Studio, it may result in events that keep playing indefinitely.
The following code can be used for DSP effects that have no tail:
See Also: FMOD_DSP_READ_CALLBACK, FMOD_DSP_DESCRIPTION, FMOD_RESULT
DSP plug-in structure that is passed into each callback.
typedef struct FMOD_DSP_STATE {
void *instance;
void *plugindata;
FMOD_CHANNELMASK channelmask;
FMOD_SPEAKERMODE source_speakermode;
float *sidechaindata;
int sidechainchannels;
FMOD_DSP_STATE_FUNCTIONS *functions;
int systemobject;
} FMOD_DSP_STATE;
'systemobject' is an integer associated with the system object that created the DSP or registered the DSP plug-in. If there is only one system object, this integer is always 0. If the DSP was created or registered by a second system object, the integer would be 1, and so on.
FMOD_DSP_STATE_FUNCTIONS::getsamplerate/getblocksize/getspeakermode could return different results, so it could be relevant to plug-in developers who want to monitor which object is being used.
Implementation Detail:
Unlike FMOD_DSP_DESCRIPTION::userdata, plugindata cannot be written to by the user, and is an ideal place to store the plug-in's state. The recommended pattern is to create the plugindata inside the FMOD_DSP_CREATE_CALLBACK, free it inside the FMOD_DSP_RELEASE_CALLBACK.
Here is an example of a simple oscillator that uses the plugindata to store the state required to generate a sine wave.
#define TWO_PI (2.0f * 3.14159265358979323846f)
typedef struct
{
unsigned int step[16];
} dsp_data;
FMOD_RESULT F_CALL Read(FMOD_DSP_STATE *dsp_state, float *inbuffer, float *outbuffer, unsigned int length, int inchannels, int *outchannels)
{
dsp_data *data = (dsp_data *)dsp_state->plugindata;
int samplerate;
dsp_state->functions->getsamplerate(dsp_state, &samplerate);
for (unsigned int sample = 0; sample < length; sample++)
{
for (int channel = 0; channel < inchannels; channel++)
{
outbuffer[sample * *outchannels + channel] = sinf((440.0f * TWO_PI * data->step[channel]++) / (float)samplerate);
}
}
return FMOD_OK;
}
FMOD_RESULT F_CALL Create(FMOD_DSP_STATE *dsp_state)
{
dsp_data *data = (dsp_data *)calloc(sizeof(dsp_data), 1);
if (!data)
{
return FMOD_ERR_MEMORY;
}
memset(data, 0, sizeof(data));
dsp_state->plugindata = data;
return FMOD_OK;
}
FMOD_RESULT F_CALL Release(FMOD_DSP_STATE *dsp_state)
{
if (dsp_state->plugindata)
{
dsp_data *data = (dsp_data *)dsp_state->plugindata;
free(data);
}
return FMOD_OK;
}
See Also: FMOD_DSP_DESCRIPTION, FMOD_DSP_STATE_FUNCTIONS
Struct containing DFT functions to enable a plug-in to perform optimized time-frequency domain conversion.
typedef struct FMOD_DSP_STATE_DFT_FUNCTIONS {
FMOD_DSP_DFT_FFTREAL_FUNC fftreal;
FMOD_DSP_DFT_IFFTREAL_FUNC inversefftreal;
} FMOD_DSP_STATE_DFT_FUNCTIONS;
Implementation Detail:
All function pointers will remain valid for the lifetime of the system.
See Also: FMOD_DSP_STATE_FUNCTIONS, FFT
Struct containing functions to give plug-in developers the ability to query system state and access system level functionality and helpers.
typedef struct FMOD_DSP_STATE_FUNCTIONS {
FMOD_DSP_ALLOC_FUNC alloc;
FMOD_DSP_REALLOC_FUNC realloc;
FMOD_DSP_FREE_FUNC free;
FMOD_DSP_GETSAMPLERATE_FUNC getsamplerate;
FMOD_DSP_GETBLOCKSIZE_FUNC getblocksize;
FMOD_DSP_STATE_DFT_FUNCTIONS *dft;
FMOD_DSP_STATE_PAN_FUNCTIONS *pan;
FMOD_DSP_GETSPEAKERMODE_FUNC getspeakermode;
FMOD_DSP_GETCLOCK_FUNC getclock;
FMOD_DSP_GETLISTENERATTRIBUTES_FUNC getlistenerattributes;
FMOD_DSP_LOG_FUNC log;
FMOD_DSP_GETUSERDATA_FUNC getuserdata;
} FMOD_DSP_STATE_FUNCTIONS;
Implementation Detail:
All function pointers will remain valid for the lifetime of the system.
See Also: FMOD_DSP_STATE, FMOD_DSP_STATE_DFT_FUNCTIONS, FMOD_DSP_STATE_PAN_FUNCTIONS
Struct containing panning helper functions for spatialization plug-ins.
typedef struct FMOD_DSP_STATE_PAN_FUNCTIONS {
FMOD_DSP_PAN_SUMMONOMATRIX_FUNC summonomatrix;
FMOD_DSP_PAN_SUMSTEREOMATRIX_FUNC sumstereomatrix;
FMOD_DSP_PAN_SUMSURROUNDMATRIX_FUNC sumsurroundmatrix;
FMOD_DSP_PAN_SUMMONOTOSURROUNDMATRIX_FUNC summonotosurroundmatrix;
FMOD_DSP_PAN_SUMSTEREOTOSURROUNDMATRIX_FUNC sumstereotosurroundmatrix;
FMOD_DSP_PAN_GETROLLOFFGAIN_FUNC getrolloffgain;
} FMOD_DSP_STATE_PAN_FUNCTIONS;
Implementation Detail:
All function pointers will remain valid for the lifetime of the system.
See Also: FMOD_DSP_STATE_FUNCTIONS, FMOD_DSP_PAN_SURROUND_FLAGS, ChannelControl::setMixMatrix
System level DSP type deregister callback.
The callback is called as a one time deregistration of a DSP plug-in type, rather than of an individual DSP instance.
FMOD_RESULT F_CALL FMOD_DSP_SYSTEM_DEREGISTER_CALLBACK(
FMOD_DSP_STATE *dsp_state
);
Invoked by:
This callback is called after all instances of the plug-in type have been released.
The callback is not associated with any DSP instance, so the instance member of FMOD_DSP_STATE will be 0 / NULL. Only 'systemobject' and 'callbacks' are valid for use.
See Also: FMOD_DSP_DESCRIPTION
System level DSP type mix callback.
The function can be used as a global pre/mid/post mix function for this type of DSP, rather than of an individual DSP instance.
FMOD_RESULT F_CALL FMOD_DSP_SYSTEM_MIX_CALLBACK(
FMOD_DSP_STATE *dsp_state,
int stage
);
Invoked by:
The callback is not associated with any DSP instance, so the instance member of FMOD_DSP_STATE will be 0 / NULL. Only 'systemobject' and 'callbacks' are valid for use.
The callback is triggered automatically by the mixer and is not triggered by any API function.
See Also: FMOD_DSP_DESCRIPTION
System level DSP type registration callback.
The callback is called as a one time initialization to set up the DSP plug-in type, rather than of an individual DSP instance.
FMOD_RESULT F_CALL FMOD_DSP_SYSTEM_REGISTER_CALLBACK(
FMOD_DSP_STATE *dsp_state
);
Invoked by:
This callback is called before any instances of the plug-in type have been created.
The callback is not associated with any DSP instance, so the instance member of FMOD_DSP_STATE will be 0 / NULL. Only 'systemobject' and 'callbacks' are valid for use.
See Also: FMOD_DSP_DESCRIPTION
The plug-in SDK version.
#define FMOD_PLUGIN_SDK_VERSION 110
See Also: FMOD_DSP_DESCRIPTION