# 7. Core API Reference | DSP

The Digital Signal Processor is one node within a graph that transforms input audio signals to an output stream.

Create with System::createDSP, System::createDSPByType or System::createDSPByPlugin.

Connections:

- DSP::addInput Adds a DSP unit as an input to this object.
- DSP::getInput Retrieves the DSP unit at the specified index in the input list.
- DSP::getOutput Retrieves the DSP unit at the specified index in the output list.
- DSP::getNumInputs Retrieves the number of DSP units in the input list.
- DSP::getNumOutputs Retrieves the number of DSP units in the output list.
- DSP::disconnectAll Disconnects all inputs and/or outputs.
- DSP::disconnectFrom Disconnect the specified input DSP.

Parameters:

- DSP::getDataParameterIndex Retrieve the index of the first data parameter of a particular data type.
- DSP::getNumParameters Retrieves the number of parameters exposed by this unit.
- DSP::setParameterBool Sets a boolean parameter by index.
- DSP::getParameterBool Retrieves a boolean parameter by index.
- DSP::setParameterData Sets a binary data parameter by index.
- DSP::getParameterData Retrieves a binary data parameter by index.
- DSP::setParameterFloat Sets a floating point parameter by index.
- DSP::getParameterFloat Retrieves a floating point parameter by index.
- DSP::setParameterInt Sets an integer parameter by index.
- DSP::getParameterInt Retrieves an integer parameter by index.
- DSP::getParameterInfo Retrieve information about a specified parameter.

Channel format:

- DSP::setChannelFormat Sets the PCM input format this DSP will receive when processing.
- DSP::getChannelFormat Retrieves the PCM input format this DSP will receive when processing.
- DSP::getOutputChannelFormat Retrieves the output format this DSP will produce when processing based on the input specified.

Metering:

- DSP::getMeteringInfo Retrieve the signal metering information.
- DSP::setMeteringEnabled Sets the input and output signal metering enabled states.
- DSP::getMeteringEnabled Retrieves the input and output signal metering enabled states.

Processing:

- DSP::setActive Sets the processing active state.
- DSP::getActive Retrieves the processing active state.
- DSP::setBypass Sets the processing bypass state.
- DSP::getBypass Retrieves the processing bypass state.
- DSP::setWetDryMix Sets the scale of the wet and dry signal components.
- DSP::getWetDryMix Retrieves the scale of the wet and dry signal components.
- DSP::getIdle Retrieves the idle state.

General:

- DSP::showConfigDialog Display or hide a DSP unit configuration dialog box inside the target window.
- DSP::reset Reset a DSPs internal state ready for new input signal.
- DSP::release Frees a DSP object.
- DSP::getType Retrieves the pre-defined type of a FMOD registered DSP unit.
- DSP::getInfo Retrieves information about this DSP unit.
- DSP::getCPUUsage Retrieves statistics on the mixer thread CPU usage for this unit.
- DSP::setUserData Sets a user value associated with this object.
- DSP::getUserData Retrieves a user value associated with this object.
- DSP::setCallback Sets the callback for DSP notifications.
- DSP::getSystemObject Retrieves the parent System object.

- FMOD_DSP_CALLBACK Callback for DSP notifications.
- FMOD_DSP_CALLBACK_TYPE Types of callbacks called by DSPs.
- FMOD_DSP_DATA_PARAMETER_INFO Describes the value of a DSP data parameter.

## DSP::addInput

Adds a DSP unit as an input to this object.

C
C++
C#
JS

    FMOD_RESULT DSP::addInput(
      DSP *input,
      DSPConnection **connection = nullptr,
      FMOD_DSPCONNECTION_TYPE type = FMOD_DSPCONNECTION_TYPE_STANDARD
    );

    FMOD_RESULT FMOD_DSP_AddInput(
      FMOD_DSP *dsp,
      FMOD_DSP *input,
      FMOD_DSPCONNECTION **connection,
      FMOD_DSPCONNECTION_TYPE type
    );

    RESULT DSP.addInput(
      DSP input
    );
    RESULT DSP.addInput(
      DSP input,
      out DSPConnection connection,
      DSPCONNECTION_TYPE type = DSPCONNECTION_TYPE.STANDARD
    );

    DSP.addInput(
      input,
      connection,
      type
    );

input
  DSP unit to be added. (DSP)
connection Out Opt
  Connection between the two units. (DSPConnection)
type

  Type of connection between the two units. (FMOD_DSPCONNECTION_TYPE)

  - Default: FMOD_DSPCONNECTION_TYPE_STANDARD

When a DSP has multiple inputs the signals are automatically mixed together, sent to the unit's output(s).

The returned `connection` will remain valid until the units are disconnected.

See Also: DSP::getInput, DSP::getNumInputs, DSP::getOutput, DSP::getNumOutputs

## FMOD_DSP_CALLBACK

Callback for DSP notifications.

C
C++
C#
JS

    FMOD_RESULT F_CALLBACK FMOD_DSP_CALLBACK(
      FMOD_DSP *dsp,
      FMOD_DSP_CALLBACK_TYPE type,
      void *data
    );

    delegate RESULT DSP_CALLBACK(
      IntPtr dsp,
      DSP_CALLBACK_TYPE type,
      IntPtr data
    );

    function FMOD_DSP_CALLBACK(
      dsp,
      type,
      data
    )

dsp
  DSP handle. (DSP)
type
  Type of callback. (FMOD_DSP_CALLBACK_TYPE)
data Opt
  Callback data; see FMOD_DSP_CALLBACK_TYPE for details.

The 'dsp' argument can be cast to `FMOD::DSP *`.

You can convert the 'dsp' argument to an FMOD.DSP object by using `FMOD.DSP dspobject = new FMOD.DSP(dsp);`

See Also: Callback Behavior, DSP::setCallback

## FMOD_DSP_CALLBACK_TYPE

Types of callbacks called by DSPs.

C
C++
C#
JS

    typedef enum FMOD_DSP_CALLBACK_TYPE {
      FMOD_DSP_CALLBACK_DATAPARAMETERRELEASE,
      FMOD_DSP_CALLBACK_MAX
    } FMOD_DSP_CALLBACK_TYPE;

    enum DSP_CALLBACK_TYPE : int
    {
      DATAPARAMETERRELEASE,
      MAX,
    }

    DSP_CALLBACK_DATAPARAMETERRELEASE
    DSP_CALLBACK_MAX

FMOD_DSP_CALLBACK_DATAPARAMETERRELEASE
  Called when a DSP's data parameter can be released.
  `data`: FMOD_DSP_DATA_PARAMETER_INFO.

Callbacks are called from the game thread when set from the Core API or Studio API in synchronous mode, and from the Studio Update Thread when in default / async mode.

See Also: Callback Behavior, DSP::setCallback

## FMOD_DSP_DATA_PARAMETER_INFO

Describes the value of a DSP data parameter.

C
C++
C#
JS

    typedef struct FMOD_DSP_DATA_PARAMETER_INFO {
      void          *data;
      unsigned int  length;
      int           index;
    } FMOD_DSP_DATA_PARAMETER_INFO;

    struct DSP_DATA_PARAMETER_INFO
    {
        IntPtr          data;
        uint            length;
        int             index;
    }

    FMOD_DSP_DATA_PARAMETER_INFO
    {
      data,
      length,
      index,
    };

data
  Pointer to the data buffer.
length
  Length of the data buffer in bytes. (unsigned int)
index
  Index of the DSP parameter. (int)

This data is passed to the DSP callback function when `type` is FMOD_DSP_CALLBACK_DATAPARAMETERRELEASE. The callback should free the `data` pointer if it is no longer required.

See Also: FMOD_DSP_CALLBACK

## DSP::disconnectAll

Disconnects all inputs and/or outputs.

C
C++
C#
JS

    FMOD_RESULT DSP::disconnectAll(
      bool inputs,
      bool outputs
    );

    FMOD_RESULT FMOD_DSP_DisconnectAll(
      FMOD_DSP *dsp,
      FMOD_BOOL inputs,
      FMOD_BOOL outputs
    );

    RESULT DSP.disconnectAll(
      bool inputs,
      bool outputs
    );

    DSP.disconnectAll(
      inputs,
      outputs
    );

inputs

  Whether all inputs should be disconnected.

  - Units: Boolean
outputs

  Whether all outputs should be disconnected.

  - Units: Boolean

This is a convenience function that is faster than disconnecting all inputs and outputs individually.

See Also: DSP::disconnectFrom

## DSP::disconnectFrom

Disconnect the specified input DSP.

C
C++
C#
JS

    FMOD_RESULT DSP::disconnectFrom(
      DSP *target,
      DSPConnection *connection = nullptr
    );

    FMOD_RESULT FMOD_DSP_DisconnectFrom(
      FMOD_DSP *dsp,
      FMOD_DSP *target,
      FMOD_DSPCONNECTION *connection
    );

    RESULT DSP.disconnectFrom(
      DSP target,
      DSPConnection connection = null
    );

    DSP.disconnectFrom(
      target,
      connection
    );

target Opt
  Input unit to disconnect, if not specified all inputs and outputs are disconnected from this unit. (DSP)
connection Opt
  When there is more than one connection between two units this can be used to define which of the connections should be disconnected. (DSPConnection)

If `target` had only one output, after this operation that entire sub graph will no longer be connected to the DSP network.

After this operation `connection` is no longer valid.

See Also: DSP::addInput, DSP::disconnectAll

## DSP::getActive

Retrieves the processing active state.

C
C++
C#
JS

    FMOD_RESULT DSP::getActive(
      bool *active
    );

    FMOD_RESULT FMOD_DSP_GetActive(
      FMOD_DSP *dsp,
      FMOD_BOOL *active
    );

    RESULT DSP.getActive(
      out bool active
    );

    DSP.getActive(
      active
    );

active Out

  Active state.

  - Units: Boolean
  - Default: False

If `active` is False, processing of this unit and its inputs are stopped.

When created a DSP is inactive. If ChannelControl::addDSP is used it will automatically be activated, otherwise it must be set to active manually.

See Also: DSP::setActive, DSP::setBypass

## DSP::getBypass

Retrieves the processing bypass state.

C
C++
C#
JS

    FMOD_RESULT DSP::getBypass(
      bool *bypass
    );

    FMOD_RESULT FMOD_DSP_GetBypass(
      FMOD_DSP *dsp,
      FMOD_BOOL *bypass
    );

    RESULT DSP.getBypass(
      out bool bypass
    );

    DSP.getBypass(
      bypass
    );

bypass Out

  Bypass state.

  - Units: Boolean
  - Default: False

If `bypass` is true, processing of this unit is skipped but it continues to process its inputs.

See Also: DSP::setBypass, DSP::setActive

## DSP::getChannelFormat

Retrieves the PCM input format this DSP will receive when processing.

C
C++
C#
JS

    FMOD_RESULT DSP::getChannelFormat(
      FMOD_CHANNELMASK *channelmask,
      int *numchannels,
      FMOD_SPEAKERMODE *source_speakermode
    );

    FMOD_RESULT FMOD_DSP_GetChannelFormat(
      FMOD_DSP *dsp,
      FMOD_CHANNELMASK *channelmask,
      int *numchannels,
      FMOD_SPEAKERMODE *source_speakermode
    );

    RESULT DSP.getChannelFormat(
      out CHANNELMASK channelmask,
      out int numchannels,
      out SPEAKERMODE source_speakermode
    );

    DSP.getChannelFormat(
      channelmask,
      numchannels,
      source_speakermode
    );

channelmask Out Opt
  Deprecated. (FMOD_CHANNELMASK)
numchannels Out Opt
  Number of channels to be processed.
source_speakermode Out Opt
  Speaker mode to describe the channel mapping. (FMOD_SPEAKERMODE)

See Also: DSP::setChannelFormat

## DSP::getCPUUsage

Retrieves statistics on the mixer thread CPU usage for this unit.

C
C++
C#
JS

    FMOD_RESULT DSP::getCPUUsage(
      unsigned int *exclusive,
      unsigned int *inclusive
    );

    FMOD_RESULT FMOD_DSP_GetCPUUsage(
      FMOD_DSP *dsp,
      unsigned int *exclusive,
      unsigned int *inclusive
    );

    RESULT DSP.getCPUUsage(
      out uint exclusive,
      out uint inclusive
    );

    DSP.getCPUUsage(
      exclusive,
      inclusive
    );

exclusive Out Opt

  CPU time spent processing just this unit during the last mixer update.

  - Units: Microseconds
inclusive Out Opt

  CPU time spent processing this unit and all of its input during the last mixer update.

  - Units: Microseconds

FMOD_INIT_PROFILE_ENABLE with System::init is required to call this function.

## DSP::getDataParameterIndex

Retrieve the index of the first data parameter of a particular data type.

C
C++
C#
JS

    FMOD_RESULT DSP::getDataParameterIndex(
      int datatype,
      int *index
    );

    FMOD_RESULT FMOD_DSP_GetDataParameterIndex(
      FMOD_DSP *dsp,
      int datatype,
      int *index
    );

    RESULT DSP.getDataParameterIndex(
      int datatype,
      out int index
    );

    DSP.getDataParameterIndex(
      datatype,
      index
    );

datatype
  The type of data to find. Typically of type FMOD_DSP_PARAMETER_DATA_TYPE.
index Out Opt
  Contains the index of the first data parameter of type `datatype` after the function is called. Will be -1 if no matches were found.

This function returns FMOD_OK if a parmeter of matching type is found and FMOD_ERR_INVALID_PARAM if no matches were found.

The return code can be used to check whether the DSP supports specific functionality through data parameters of certain types without the need to provide `index`.

## DSP::getIdle

Retrieves the idle state.

C
C++
C#
JS

    FMOD_RESULT DSP::getIdle(
      bool *idle
    );

    FMOD_RESULT FMOD_DSP_GetIdle(
      FMOD_DSP *dsp,
      FMOD_BOOL *idle
    );

    RESULT DSP.getIdle(
      out bool idle
    );

    DSP.getIdle(
      idle
    );

idle Out

  Idle state.

  - Units: Boolean

A DSP is considered idle when it stops receiving input signal and all internal processing of stored input has been exhausted.

Each DSP type has the potential to have differing idle behaviour based on the type of effect. A reverb or echo may take a longer time to go idle after it stops receiving a valid signal, compared to an effect with a shorter tail length like an EQ filter.

## DSP::getInfo

Retrieves information about this DSP unit.

C
C++
C#
JS

    FMOD_RESULT DSP::getInfo(
      char *name,
      unsigned int *version,
      int *channels,
      int *configwidth,
      int *configheight
    );

    FMOD_RESULT FMOD_DSP_GetInfo(
      FMOD_DSP *dsp,
      char *name,
      unsigned int *version,
      int *channels,
      int *configwidth,
      int *configheight
    );

    RESULT DSP.getInfo(
      out string name,
      out uint version,
      out int channels,
      out int configwidth,
      out int configheight
    );

    DSP.getInfo(
      name,
      version,
      channels,
      configwidth,
      configheight
    );

name Out Opt
  The name of this unit will be written (null terminated) to the provided 32 byte buffer. (UTF-8 string)
version Out Opt
  Version number of this unit, usually formated as hex AAAABBBB where the AAAA is the major version number and the BBBB is the minor version number.
channels Out Opt
  Number of channels this unit processes where 0 represents "any".
configwidth Out Opt
  Configuration dialog box width where 0 represents "no dialog box".
configheight Out Opt
  Configuration dialog box height where 0 represents "no dialog box".

See Also: DSP::showConfigDialog

## DSP::getInput

Retrieves the DSP unit at the specified index in the input list.

C
C++
C#
JS

    FMOD_RESULT DSP::getInput(
      int index,
      DSP **input,
      DSPConnection **inputconnection
    );

    FMOD_RESULT FMOD_DSP_GetInput(
      FMOD_DSP *dsp,
      int index,
      FMOD_DSP **input,
      FMOD_DSPCONNECTION **inputconnection
    );

    RESULT DSP.getInput(
      int index,
      out DSP input,
      out DSPConnection inputconnection
    );

    DSP.getInput(
      index,
      input,
      inputconnection
    );

index

  Offset into this DSP's input list.

  - Range: [0, DSP::getNumInputs)
input Out Opt
  DSP unit at the specified `index`. (DSP)
inputconnection Out Opt
  Connection between this unit and `input`. (DSPConnection)

This will flush the DSP queue (which blocks against the mixer) to ensure the input list is correct, avoid this during time sensitive operations.

The returned `connection` will remain valid until the units are disconnected.

See Also: DSP::addInput, DSP::getOutput

## DSP::getMeteringEnabled

Retrieves the input and output signal metering enabled states.

C
C++
C#
JS

    FMOD_RESULT DSP::getMeteringEnabled(
      bool *inputEnabled,
      bool *outputEnabled
    );

    FMOD_RESULT FMOD_DSP_GetMeteringEnabled(
      FMOD_DSP *dsp,
      FMOD_BOOL *inputEnabled,
      FMOD_BOOL *outputEnabled
    );

    RESULT DSP.getMeteringEnabled(
      out bool inputEnabled,
      out bool outputEnabled
    );

    DSP.getMeteringEnabled(
      inputEnabled,
      outputEnabled
    );

inputEnabled Out Opt

  Metering enabled state for the input signal.

  - Units: Boolean
  - Default: False
outputEnabled Out Opt

  Metering enabled state for the output signal.

  - Units: Boolean
  - Default: False

Input metering is pre processing, while output metering is post processing.

Enabled metering allows DSP::getMeteringInfo to return metering information and allows FMOD profiling tools to visualize the levels.

FMOD_INIT_PROFILE_METER_ALL with System::init will automatically turn on metering for all DSP units inside the mixer graph.

See Also: DSP::setMeteringEnabled

## DSP::getMeteringInfo

Retrieve the signal metering information.

C
C++
C#
JS

    FMOD_RESULT DSP::getMeteringInfo(
      FMOD_DSP_METERING_INFO *inputInfo,
      FMOD_DSP_METERING_INFO *outputInfo
    );

    FMOD_RESULT FMOD_DSP_GetMeteringInfo(
      FMOD_DSP *dsp,
      FMOD_DSP_METERING_INFO *inputInfo,
      FMOD_DSP_METERING_INFO *outputInfo
    );

    RESULT DSP.getMeteringInfo(
      IntPtr zero,
      DSP_METERING_INFO outputInfo
    );
    RESULT DSP.getMeteringInfo(
      DSP_METERING_INFO inputInfo,
      IntPtr zero
    );
    RESULT DSP.getMeteringInfo(
      DSP_METERING_INFO inputInfo,
      DSP_METERING_INFO outputInfo
    );

    DSP.getMeteringInfo(
      inputInfo,
      outputInfo
    );

inputInfo Out Opt
  Input metering information before the DSP has processed. (FMOD_DSP_METERING_INFO)
outputInfo Out Opt
  Output metering information after the DSP has processed. (FMOD_DSP_METERING_INFO)

Requesting metering information when it hasn't been enabled will result in FMOD_ERR_BADCOMMAND.

FMOD_INIT_PROFILE_METER_ALL with System::init will automatically enable metering for all DSP units.

See Also: DSP::setMeteringEnabled, DSP::getMeteringEnabled

## DSP::getNumInputs

Retrieves the number of DSP units in the input list.

C
C++
C#
JS

    FMOD_RESULT DSP::getNumInputs(
      int *numinputs
    );

    FMOD_RESULT FMOD_DSP_GetNumInputs(
      FMOD_DSP *dsp,
      int *numinputs
    );

    RESULT DSP.getNumInputs(
      out int numinputs
    );

    DSP.getNumInputs(
      numinputs
    );

numinputs Out
  Number of input DSPs.

This will flush the DSP queue (which blocks against the mixer) to ensure the input list is correct, avoid this during time sensitive operations.

See Also: DSP::getNumOutputs, DSP::getInput

## DSP::getNumOutputs

Retrieves the number of DSP units in the output list.

C
C++
C#
JS

    FMOD_RESULT DSP::getNumOutputs(
      int *numoutputs
    );

    FMOD_RESULT FMOD_DSP_GetNumOutputs(
      FMOD_DSP *dsp,
      int *numoutputs
    );

    RESULT DSP.getNumOutputs(
      out int numoutputs
    );

    DSP.getNumOutputs(
      numoutputs
    );

numoutputs Out
  Number of output DSPs.

This will flush the DSP queue (which blocks against the mixer) to ensure the output list is correct, avoid this during time sensitive operations.

See Also: DSP::getNumInputs, DSP::getOutput

## DSP::getNumParameters

Retrieves the number of parameters exposed by this unit.

C
C++
C#
JS

    FMOD_RESULT DSP::getNumParameters(
      int *numparams
    );

    FMOD_RESULT FMOD_DSP_GetNumParameters(
      FMOD_DSP *dsp,
      int *numparams
    );

    RESULT DSP.getNumParameters(
      out int numparams
    );

    DSP.getNumParameters(
      numparams
    );

numparams Out
  Number of parameters.

Use this to enumerate all parameters of a DSP unit with DSP::getParameterInfo.

See Also: DSP::setParameterFloat, DSP::setParameterInt, DSP::setParameterBool, DSP::setParameterData

## DSP::getOutput

Retrieves the DSP unit at the specified index in the output list.

C
C++
C#
JS

    FMOD_RESULT DSP::getOutput(
      int index,
      DSP **output,
      DSPConnection **outputconnection
    );

    FMOD_RESULT FMOD_DSP_GetOutput(
      FMOD_DSP *dsp,
      int index,
      FMOD_DSP **output,
      FMOD_DSPCONNECTION **outputconnection
    );

    RESULT DSP.getOutput(
      int index,
      out DSP output,
      out DSPConnection outputconnection
    );

    DSP.getOutput(
      index,
      output,
      outputconnection
    );

index

  Offset into this DSP's output list.

  - Range: [0, DSP::getNumOutputs)
output Out Opt
  DSP unit at the specified `index`. (DSP)
outputconnection Out Opt
  Connection between this unit and `output`. (DSPConnection)

This will flush the DSP queue (which blocks against the mixer) to ensure the output list is correct, avoid this during time sensitive operations.

The returned `connection` will remain valid until the units are disconnected.

See Also: DSP::addInput, DSP::getInput

## DSP::getOutputChannelFormat

Retrieves the output format this DSP will produce when processing based on the input specified.

C
C++
C#
JS

    FMOD_RESULT DSP::getOutputChannelFormat(
      FMOD_CHANNELMASK inmask,
      int inchannels,
      FMOD_SPEAKERMODE inspeakermode,
      FMOD_CHANNELMASK *outmask,
      int *outchannels,
      FMOD_SPEAKERMODE *outspeakermode
    );

    FMOD_RESULT FMOD_DSP_GetOutputChannelFormat(
      FMOD_DSP *dsp,
      FMOD_CHANNELMASK inmask,
      int inchannels,
      FMOD_SPEAKERMODE inspeakermode,
      FMOD_CHANNELMASK *outmask,
      int *outchannels,
      FMOD_SPEAKERMODE *outspeakermode
    );

    RESULT DSP.getOutputChannelFormat(
      CHANNELMASK inmask,
      int inchannels,
      SPEAKERMODE inspeakermode,
      out CHANNELMASK outmask,
      out int outchannels,
      out SPEAKERMODE outspeakermode
    );

    DSP.getOutputChannelFormat(
      inmask,
      inchannels,
      inspeakermode,
      outmask,
      outchannels,
      outspeakermode
    );

inmask
  Deprecated. (FMOD_CHANNELMASK)
inchannels
  Number of channels for the input signal.
inspeakermode
  Speaker mode for the input signal. (FMOD_SPEAKERMODE)
outmask Out Opt
  Deprecated. (FMOD_CHANNELMASK)
outchannels Out Opt
  Number of channels for the output signal.
outspeakermode Out Opt
  Speaker mode for the output signal. (FMOD_SPEAKERMODE)

See Also: DSP::setChannelFormat, DSP::getChannelFormat

## DSP::getParameterBool

Retrieves a boolean parameter by index.

C
C++
C#
JS

    FMOD_RESULT DSP::getParameterBool(
      int index,
      bool *value,
      char *valuestr,
      int valuestrlen
    );

    FMOD_RESULT FMOD_DSP_GetParameterBool(
      FMOD_DSP *dsp,
      int index,
      FMOD_BOOL *value,
      char *valuestr,
      int valuestrlen
    );

    RESULT DSP.getParameterBool(
      int index,
      out bool value
    );

    DSP.getParameterBool(
      index,
      value,
      valuestr
    );

index

  Parameter index.

  - Range: [0, DSP::getNumParameters)
value Out Opt

  Parameter boolean data.

  - Units: Boolean
valuestr Out Opt
  String representation `value`. (UTF-8 string)
valuestrlen

  Length of `valuestr`.

  - Range: [0, FMOD_DSP_GETPARAM_VALUESTR_LENGTH]

See Also: DSP::setParameterBool, DSP::getParameterInfo

## DSP::getParameterData

Retrieves a binary data parameter by index.

C
C++
C#
JS

    FMOD_RESULT DSP::getParameterData(
      int index,
      void **data,
      unsigned int *length,
      char *valuestr,
      int valuestrlen
    );

    FMOD_RESULT FMOD_DSP_GetParameterData(
      FMOD_DSP *dsp,
      int index,
      void **data,
      unsigned int *length,
      char *valuestr,
      int valuestrlen
    );

    RESULT DSP.getParameterData(
      int index,
      out IntPtr data,
      out uint length
    );

    DSP.getParameterData(
      index,
      data,
      length,
      valuestr
    );

index

  Parameter index.

  - Range: [0, DSP::getNumParameters)
data Out Opt
  Parameter binary data.
length Out Opt

  Length of `data`.

  - Units: Bytes
valuestr Out Opt
  String representation `data`. (UTF-8 string)
valuestrlen

  Length of `valuestr`.

  - Range: [0, FMOD_DSP_GETPARAM_VALUESTR_LENGTH]

See Also: DSP::setParameterData, DSP::getParameterInfo

## DSP::getParameterFloat

Retrieves a floating point parameter by index.

C
C++
C#
JS

    FMOD_RESULT DSP::getParameterFloat(
      int index,
      float *value,
      char *valuestr,
      int valuestrlen
    );

    FMOD_RESULT FMOD_DSP_GetParameterFloat(
      FMOD_DSP *dsp,
      int index,
      float *value,
      char *valuestr,
      int valuestrlen
    );

    RESULT DSP.getParameterFloat(
      int index,
      out float value
    );

    DSP.getParameterFloat(
      index,
      value,
      valuestr
    );

index

  Parameter index.

  - Range: [0, DSP::getNumParameters)
value Out Opt
  Parameter floating point data.
valuestr Out Opt
  String representation `value`. (UTF-8 string)
valuestrlen

  Length of `valuestr`.

  - Range: [0, FMOD_DSP_GETPARAM_VALUESTR_LENGTH]

See Also: DSP::setParameterFloat, DSP::getParameterInfo

## DSP::getParameterInfo

Retrieve information about a specified parameter.

C
C++
C#
JS

    FMOD_RESULT DSP::getParameterInfo(
      int index,
      FMOD_DSP_PARAMETER_DESC **desc
    );

    FMOD_RESULT FMOD_DSP_GetParameterInfo(
      FMOD_DSP *dsp,
      int index,
      FMOD_DSP_PARAMETER_DESC **desc
    );

    RESULT DSP.getParameterInfo(
      int index,
      out DSP_PARAMETER_DESC desc
    );

    DSP.getParameterInfo(
      index,
      desc
    );

index

  Parameter index.

  - Range: [0, DSP::getNumParameters)
desc Out
  Parameter description at the specified `index`. (FMOD_DSP_PARAMETER_DESC)

See Also: DSP::setParameterFloat, DSP::setParameterInt, DSP::setParameterBool, DSP::setParameterData

## DSP::getParameterInt

Retrieves an integer parameter by index.

C
C++
C#
JS

    FMOD_RESULT DSP::getParameterInt(
      int index,
      int *value,
      char *valuestr,
      int valuestrlen
    );

    FMOD_RESULT FMOD_DSP_GetParameterInt(
      FMOD_DSP *dsp,
      int index,
      int *value,
      char *valuestr,
      int valuestrlen
    );

    RESULT DSP.getParameterInt(
      int index,
      out int value
    );

    DSP.getParameterInt(
      index,
      value,
      valuestr
    );

index

  Parameter index.

  - Range: [0, DSP::getNumParameters)
value Out Opt
  Parameter integer data.
valuestr Out Opt
  String representation `value`. (UTF-8 string)
valuestrlen

  Length of `valuestr`.

  - Range: [0, FMOD_DSP_GETPARAM_VALUESTR_LENGTH]

See Also: DSP::setParameterInt, DSP::getParameterInfo

## DSP::getSystemObject

Retrieves the parent System object.

C
C++
C#
JS

    FMOD_RESULT DSP::getSystemObject(
      System **system
    );

    FMOD_RESULT FMOD_DSP_GetSystemObject(
      FMOD_DSP *dsp,
      FMOD_SYSTEM **system
    );

    RESULT DSP.getSystemObject(
      out System system
    );

    DSP.getSystemObject(
      system
    );

system Out
  System object. (System)

See Also: System::createDSP, System::createDSPByType

## DSP::getType

Retrieves the pre-defined type of a FMOD registered DSP unit.

C
C++
C#
JS

    FMOD_RESULT DSP::getType(
      FMOD_DSP_TYPE *type
    );

    FMOD_RESULT FMOD_DSP_GetType(
      FMOD_DSP *dsp,
      FMOD_DSP_TYPE *type
    );

    RESULT DSP.getType(
      out DSP_TYPE type
    );

    DSP.getType(
      type
    );

type Out
  DSP type. (FMOD_DSP_TYPE)

This is only valid for built in FMOD effects. Any user plugins will simply return FMOD_DSP_TYPE_UNKNOWN.

## DSP::getUserData

Retrieves a user value associated with this object.

C
C++
C#
JS

    FMOD_RESULT DSP::getUserData(
      void **userdata
    );

    FMOD_RESULT FMOD_DSP_GetUserData(
      FMOD_DSP *dsp,
      void **userdata
    );

    RESULT DSP.getUserData(
      out IntPtr userdata
    );

    DSP.getUserData(
      userdata
    );

userdata Out
  User data set by calling DSP::setUserData.

This function allows arbitrary user data to be retrieved from this object. See the User Data section of the glossary for an example of how to get and set user data.

## DSP::getWetDryMix

Retrieves the scale of the wet and dry signal components.

C
C++
C#
JS

    FMOD_RESULT DSP::getWetDryMix(
      float *prewet,
      float *postwet,
      float *dry
    );

    FMOD_RESULT FMOD_DSP_GetWetDryMix(
      FMOD_DSP *dsp,
      float *prewet,
      float *postwet,
      float *dry
    );

    RESULT DSP.getWetDryMix(
      out float prewet,
      out float postwet,
      out float dry
    );

    DSP.getWetDryMix(
      prewet,
      postwet,
      dry
    );

prewet Out Opt

  Level of the 'Dry' (pre-processed signal) mix that is processed by the DSP. 0 = silent, 1 = full. Negative level inverts the signal. Values larger than 1 amplify the signal.

  - Units: Linear
  - Range: (-inf, inf)
  - Default: 1
postwet Out Opt

  Level of the 'Wet' (post-processed signal) mix that is output. 0 = silent, 1 = full. Negative level inverts the signal. Values larger than 1 amplify the signal.

  - Units: Linear
  - Range: (-inf, inf)
  - Default: 1
dry Out Opt

  Level of the 'Dry' (pre-processed signal) mix that is output. 0 = silent, 1 = full. Negative level inverts the signal. Values larger than 1 amplify the signal.

  - Units: Linear
  - Range: (-inf, inf)
  - Default: 1

See Also: DSP::setWetDryMix

## DSP::release

Frees a DSP object.

C
C++
C#
JS

    FMOD_RESULT DSP::release();

    FMOD_RESULT FMOD_DSP_Release(FMOD_DSP *dsp);

    RESULT DSP.release();

    DSP.release();

If DSP is not removed from the network with ChannelControl::removeDSP after being added with ChannelControl::addDSP, it will not release and will instead return FMOD_ERR_DSP_INUSE.

See Also: System::createDSP

## DSP::reset

Reset a DSPs internal state ready for new input signal.

C
C++
C#
JS

    FMOD_RESULT DSP::reset();

    FMOD_RESULT FMOD_DSP_Reset(FMOD_DSP *dsp);

    RESULT DSP.reset();

    DSP.reset();

This will clear all internal state derived from input signal while retaining any set parameter values. The intended use of the function is to avoid audible artifacts if moving the DSP from one part of the DSP network to another.

## DSP::setActive

Sets the processing active state.

C
C++
C#
JS

    FMOD_RESULT DSP::setActive(
      bool active
    );

    FMOD_RESULT FMOD_DSP_SetActive(
      FMOD_DSP *dsp,
      FMOD_BOOL active
    );

    RESULT DSP.setActive(
      bool active
    );

    DSP.setActive(
      active
    );

active

  Active state.

  - Units: Boolean
  - Default: False

If `active` is false, processing of this unit and its inputs are stopped.

When created a DSP is inactive. If ChannelControl::addDSP is used it will automatically be activated, otherwise it must be set to active manually.

See Also: DSP::getActive, DSP::setBypass, DSP::getBypass

## DSP::setBypass

Sets the processing bypass state.

C
C++
C#
JS

    FMOD_RESULT DSP::setBypass(
      bool bypass
    );

    FMOD_RESULT FMOD_DSP_SetBypass(
      FMOD_DSP *dsp,
      FMOD_BOOL bypass
    );

    RESULT DSP.setBypass(
      bool bypass
    );

    DSP.setBypass(
      bypass
    );

bypass

  Bypass state.

  - Units: Boolean
  - Default: False

If `bypass` is true, processing of this unit is skipped but it continues to process its inputs.

See Also: DSP::getBypass, DSP::setActive, DSP::getActive

## DSP::setCallback

Sets the callback for DSP notifications.

C
C++
C#
JS

    FMOD_RESULT DSP::setCallback(
      FMOD_DSP_CALLBACK callback
    );

    FMOD_RESULT FMOD_DSP_SetCallback(
      FMOD_DSP *dsp,
      FMOD_DSP_CALLBACK callback
    );

    RESULT DSP.setCallback(
      DSP_CALLBACK callback
    );

    DSP.setCallback(
      callback
    );

callback
  Callback to invoke. (FMOD_DSP_CALLBACK)

See Also: Callback Behavior, FMOD_DSP_CALLBACK_TYPE

## DSP::setChannelFormat

Sets the PCM input format this DSP will receive when processing.

C
C++
C#
JS

    FMOD_RESULT DSP::setChannelFormat(
      FMOD_CHANNELMASK channelmask,
      int numchannels,
      FMOD_SPEAKERMODE source_speakermode
    );

    FMOD_RESULT FMOD_DSP_SetChannelFormat(
      FMOD_DSP *dsp,
      FMOD_CHANNELMASK channelmask,
      int numchannels,
      FMOD_SPEAKERMODE source_speakermode
    );

    RESULT DSP.setChannelFormat(
      CHANNELMASK channelmask,
      int numchannels,
      SPEAKERMODE source_speakermode
    );

    DSP.setChannelFormat(
      channelmask,
      numchannels,
      source_speakermode
    );

channelmask
  Deprecated. (FMOD_CHANNELMASK)
numchannels

  Number of channels to be processed.

  - Range: [0, FMOD_MAX_CHANNEL_WIDTH]
source_speakermode
  Speaker mode to describe the channel mapping. (FMOD_SPEAKERMODE)

Setting the number of channels on a unit will force either a down or up mix to that channel count before processing the DSP read/process callback.

See Also: DSP::getChannelFormat

## DSP::setMeteringEnabled

Sets the input and output signal metering enabled states.

C
C++
C#
JS

    FMOD_RESULT DSP::setMeteringEnabled(
      bool inputEnabled,
      bool outputEnabled
    );

    FMOD_RESULT FMOD_DSP_SetMeteringEnabled(
      FMOD_DSP *dsp,
      FMOD_BOOL inputEnabled,
      FMOD_BOOL outputEnabled
    );

    RESULT DSP.setMeteringEnabled(
      bool inputEnabled,
      bool outputEnabled
    );

    DSP.setMeteringEnabled(
      inputEnabled,
      outputEnabled
    );

inputEnabled

  Metering enabled state for the input signal.

  - Units: Boolean
  - Default: False
outputEnabled

  Metering enabled state for the output signal.

  - Units: Boolean
  - Default: False

Input metering is pre processing, while output metering is post processing.

Enabled metering allows DSP::getMeteringInfo to return metering information and allows FMOD profiling tools to visualize the levels.

FMOD_INIT_PROFILE_METER_ALL with System::init will automatically turn on metering for all DSP units inside the mixer graph.

This function must have `inputEnabled` and `outputEnabled` set to `true` if being used by the FMOD Studio API, such as in the Unity or Unreal Engine integrations, in order to avoid conflict with FMOD Studio's live update feature.

See Also: DSP::getMeteringEnabled

## DSP::setParameterBool

Sets a boolean parameter by index.

C
C++
C#
JS

    FMOD_RESULT DSP::setParameterBool(
      int index,
      bool value
    );

    FMOD_RESULT FMOD_DSP_SetParameterBool(
      FMOD_DSP *dsp,
      int index,
      FMOD_BOOL value
    );

    RESULT DSP.setParameterBool(
      int index,
      bool value
    );

    DSP.setParameterBool(
      index,
      value
    );

index

  Parameter index.

  - Range: [0, DSP::getNumParameters)
value

  Parameter value.

  - Units: Boolean

See Also: DSP::getParameterInfo, DSP::getParameterBool

## DSP::setParameterData

Sets a binary data parameter by index.

C
C++
C#
JS

    FMOD_RESULT DSP::setParameterData(
      int index,
      void *data,
      unsigned int length
    );

    FMOD_RESULT FMOD_DSP_SetParameterData(
      FMOD_DSP *dsp,
      int index,
      void *data,
      unsigned int length
    );

    RESULT DSP.setParameterData(
      int index,
      byte[] data
    );

    DSP.setParameterData(
      index,
      data,
      length
    );

index

  Parameter index.

  - Range: [0, DSP::getNumParameters)
data
  Parameter binary data.
length

  Length of `data`.

  - Units: Bytes

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

See Also: DSP::getParameterInfo, DSP::getParameterData

## DSP::setParameterFloat

Sets a floating point parameter by index.

C
C++
C#
JS

    FMOD_RESULT DSP::setParameterFloat(
      int index,
      float value
    );

    FMOD_RESULT FMOD_DSP_SetParameterFloat(
      FMOD_DSP *dsp,
      int index,
      float value
    );

    RESULT DSP.setParameterFloat(
      int index,
      float value
    );

    DSP.setParameterFloat(
      index,
      value
    );

index

  Parameter index.

  - Range: [0, DSP::getNumParameters)
value
  Parameter floating point data.

See Also: DSP::getParameterInfo, DSP::getParameterFloat

## DSP::setParameterInt

Sets an integer parameter by index.

C
C++
C#
JS

    FMOD_RESULT DSP::setParameterInt(
      int index,
      int value
    );

    FMOD_RESULT FMOD_DSP_SetParameterInt(
      FMOD_DSP *dsp,
      int index,
      int value
    );

    RESULT DSP.setParameterInt(
      int index,
      int value
    );

    DSP.setParameterInt(
      index,
      value
    );

index

  Parameter index.

  - Range: [0, DSP::getNumParameters)
value
  Parameter integer data.

See Also: DSP::getParameterInfo, DSP::getParameterInt

## DSP::setUserData

Sets a user value associated with this object.

C
C++
C#
JS

    FMOD_RESULT DSP::setUserData(
      void *userdata
    );

    FMOD_RESULT FMOD_DSP_SetUserData(
      FMOD_DSP *dsp,
      void *userdata
    );

    RESULT DSP.setUserData(
      IntPtr userdata
    );

    DSP.setUserData(
      userdata
    );

userdata
  Value stored on this object.

This function allows arbitrary user data to be attached to this object. See the User Data section of the glossary for an example of how to get and set user data.

See Also: DSP::getUserData

## DSP::setWetDryMix

Sets the scale of the wet and dry signal components.

C
C++
C#
JS

    FMOD_RESULT DSP::setWetDryMix(
      float prewet,
      float postwet,
      float dry
    );

    FMOD_RESULT FMOD_DSP_SetWetDryMix(
      FMOD_DSP *dsp,
      float prewet,
      float postwet,
      float dry
    );

    RESULT DSP.setWetDryMix(
      float prewet,
      float postwet,
      float dry
    );

    DSP.setWetDryMix(
      prewet,
      postwet,
      dry
    );

prewet

  Level of the 'Dry' (pre-processed signal) mix that is processed by the DSP. 0 = silent, 1 = full. Negative level inverts the signal. Values larger than 1 amplify the signal.

  - Units: Linear
  - Range: (-inf, inf)
  - Default: 1
postwet

  Level of the 'Wet' (post-processed signal) mix that is output. 0 = silent, 1 = full. Negative level inverts the signal. Values larger than 1 amplify the signal.

  - Units: Linear
  - Range: (-inf, inf)
  - Default: 1
dry

  Level of the 'Dry' (pre-processed signal) mix that is output. 0 = silent, 1 = full. Negative level inverts the signal. Values larger than 1 amplify the signal.

  - Units: Linear
  - Range: (-inf, inf)
  - Default: 0

The dry signal path is silent by default, because dsp effects transform the input and pass the newly processed result to the output.

See Also: DSP::getWetDryMix

## DSP::showConfigDialog

Display or hide a DSP unit configuration dialog box inside the target window.

C
C++
C#
JS

    FMOD_RESULT DSP::showConfigDialog(
      void *hwnd,
      bool show
    );

    FMOD_RESULT FMOD_DSP_ShowConfigDialog(
      FMOD_DSP *dsp,
      void *hwnd,
      FMOD_BOOL show
    );

    RESULT DSP.showConfigDialog(
      IntPtr hwnd,
      bool show
    );

    DSP.showConfigDialog(
      hwnd,
      show
    );

hwnd
  Target HWND in windows to display configuration dialog.
show

  Whether to show or hide the dialog box inside target hwnd.

  - Units: Boolean

Dialog boxes are used by DSP plugins that prefer to use a graphical user interface to modify their parameters rather than using the other method of enumerating the parameters and using DSP::setParameterFloat / DSP::setParameterInt / DSP::setParameterBool / DSP::setParameterData.

These are usually VST plugins. FMOD Studio plugins do not have configuration dialog boxes. To find out what size window to create to store the configuration screen, use DSP::getInfo where you can get the width and height.