# 7. Core API Reference | ChannelControl

An interface that represents the shared APIs between Channel and ChannelGroup.

Playback:

- ChannelControl::isPlaying Retrieves the playing state.
- ChannelControl::stop Stops the Channel (or all Channels in nested ChannelGroups) from playing.
- ChannelControl::setPaused Sets the paused state.
- ChannelControl::getPaused Retrieves the paused state.
- ChannelControl::setMode Sets the playback mode that controls how this object behaves.
- ChannelControl::getMode Retrieves the playback mode bits that control how this object behaves.
- ChannelControl::setPitch Sets the relative pitch / playback rate.
- ChannelControl::getPitch Retrieves the relative pitch / playback rate.

Volume levels:

- ChannelControl::getAudibility Retrieves an estimation of the output volume.
- ChannelControl::setVolume Sets the volume level.
- ChannelControl::getVolume Retrieves the volume level.
- ChannelControl::setVolumeRamp Sets whether volume changes are ramped or instantaneous.
- ChannelControl::getVolumeRamp Retrieves whether volume changes are ramped or instantaneous.
- ChannelControl::setMute Sets the mute state.
- ChannelControl::getMute Retrieves the mute state.

Spatialization:

- ChannelControl::set3DAttributes Sets the 3D position and velocity used to apply panning, attenuation and doppler.
- ChannelControl::get3DAttributes Retrieves the 3D position and velocity used to apply panning, attenuation and doppler.
- ChannelControl::set3DConeOrientation Sets the orientation of a 3D cone shape, used for simulated occlusion.
- ChannelControl::get3DConeOrientation Retrieves the orientation of a 3D cone shape, used for simulated occlusion.
- ChannelControl::set3DConeSettings Sets the angles and attenuation levels of a 3D cone shape, for simulated occlusion which is based on direction.
- ChannelControl::get3DConeSettings Retrieves the angles and attenuation levels of a 3D cone shape, for simulated occlusion which is based on direction.
- ChannelControl::set3DCustomRolloff Sets a custom rolloff shape for 3D distance attenuation.
- ChannelControl::get3DCustomRolloff Retrieves the current custom rolloff shape for 3D distance attenuation.
- ChannelControl::set3DDistanceFilter Sets an override value for the 3D distance filter.
- ChannelControl::get3DDistanceFilter Retrieves the override values for the 3D distance filter.
- ChannelControl::set3DDopplerLevel Sets the amount by which doppler is scaled.
- ChannelControl::get3DDopplerLevel Retrieves the amount by which doppler is scaled.
- ChannelControl::set3DLevel Sets the blend between 3D panning and 2D panning.
- ChannelControl::get3DLevel Retrieves the blend between 3D panning and 2D panning.
- ChannelControl::set3DMinMaxDistance Sets the minimum and maximum distances used to calculate the 3D rolloff attenuation.
- ChannelControl::get3DMinMaxDistance Retrieves the minimum and maximum distances used to calculate the 3D rolloff attenuation.
- ChannelControl::set3DOcclusion Sets the 3D attenuation factors for the direct and reverb paths.
- ChannelControl::get3DOcclusion Retrieves the 3D attenuation factors for the direct and reverb paths.
- ChannelControl::set3DSpread Sets the spread of a 3D sound in speaker space.
- ChannelControl::get3DSpread Retrieves the spread of a 3D sound in speaker space.

Panning and level adjustment:

- ChannelControl::setPan Sets the left/right pan level.
- ChannelControl::setMixLevelsInput Sets the incoming volume level for each channel of a multi-channel signal.
- ChannelControl::setMixLevelsOutput Sets the outgoing volume levels for each speaker.
- ChannelControl::setMixMatrix Sets a 2 dimensional pan matrix that maps the signal from input channels (columns) to output speakers (rows).
- ChannelControl::getMixMatrix Retrieves a 2 dimensional pan matrix that maps the signal from input channels (columns) to output speakers (rows).

Filtering:

- ChannelControl::setReverbProperties Sets the wet / send level for a particular reverb instance.
- ChannelControl::getReverbProperties Retrieves the wet / send level for a particular reverb instance.
- ChannelControl::setLowPassGain Sets the gain of the dry signal when built in lowpass / distance filtering is applied.
- ChannelControl::getLowPassGain Retrieves the gain of the dry signal when built in lowpass / distance filtering is applied.

DSP chain configuration:

- ChannelControl::addDSP Adds a DSP unit to the specified index in the DSP chain.
- ChannelControl::removeDSP Removes the specified DSP unit from the DSP chain.
- ChannelControl::getNumDSPs Retrieves the number of DSP units in the DSP chain.
- ChannelControl::getDSP Retrieves the DSP unit at the specified index in the DSP chain.
- ChannelControl::setDSPIndex Sets the index in the DSP chain of the specified DSP.
- ChannelControl::getDSPIndex Retrieves the index of a DSP inside the Channel or ChannelGroup's DSP chain.

- FMOD_CHANNELCONTROL_DSP_INDEX References to built in DSP positions that reside in a Channel or ChannelGroup DSP chain.

Sample accurate scheduling:

- ChannelControl::getDSPClock Retrieves the DSP clock values at this point in time.
- ChannelControl::setDelay Sets a sample accurate start (and/or stop) time relative to the parent ChannelGroup DSP clock.
- ChannelControl::getDelay Retrieves a sample accurate start (and/or stop) time relative to the parent ChannelGroup DSP clock.
- ChannelControl::addFadePoint Adds a sample accurate fade point at a time relative to the parent ChannelGroup DSP clock.
- ChannelControl::setFadePointRamp Adds a volume ramp at the specified time in the future using fade points.
- ChannelControl::removeFadePoints Removes all fade points between the two specified clock values (inclusive).
- ChannelControl::getFadePoints Retrieves information about stored fade points.

General:

- ChannelControl::setCallback Sets the callback for ChannelControl level notifications.
- ChannelControl::setUserData Sets a user value associated with this object.
- ChannelControl::getUserData Retrieves a user value associated with this object.
- ChannelControl::getSystemObject Retrieves the System that created this object.

- FMOD_CHANNELCONTROL_CALLBACK Callback for Channel or ChannelGroup notifications.

- FMOD_CHANNELCONTROL_TYPE Identifier used to distinguish between Channel and ChannelGroup in the ChannelControl callback.
- FMOD_CHANNELCONTROL_CALLBACK_TYPE Types of callbacks called by Channels and ChannelGroups.

## ChannelControl::addDSP

Adds a DSP unit to the specified index in the DSP chain.

See DSP chain

C
C++
C#
JS

    FMOD_RESULT ChannelControl::addDSP(
      int index,
      DSP *dsp
    );

    FMOD_RESULT FMOD_Channel_AddDSP(
      FMOD_CHANNEL *channel,
      int index,
      FMOD_DSP *dsp
    );
    FMOD_RESULT FMOD_ChannelGroup_AddDSP(
      FMOD_CHANNELGROUP *channelgroup,
      int index,
      FMOD_DSP *dsp
    );

    RESULT ChannelControl.addDSP(
      int index,
      DSP dsp
    );

    Channel.addDSP(
      index,
      dsp
    );
    ChannelGroup.addDSP(
      index,
      dsp
    );

index

  Offset into the DSP chain, see FMOD_CHANNELCONTROL_DSP_INDEX for special named offsets for 'head' and 'tail' and 'fader' units.

  - Range: [0, ChannelControl::getNumDSPs)
dsp
  DSP unit to be added. (DSP)

If `dsp` is already added to an existing object it will be removed and then added to this object.

For detailed information on FMOD's DSP network, read the DSP Architecture and Usage white paper.

See Also: ChannelControl::removeDSP, System::createDSP, System::createDSPByType, System::createDSPByPlugin

## ChannelControl::addFadePoint

Adds a sample accurate fade point at a time relative to the parent ChannelGroup DSP clock.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::addFadePoint(
      unsigned long long dspclock,
      float volume
    );

    FMOD_RESULT FMOD_Channel_AddFadePoint(
      FMOD_CHANNEL *channel,
      unsigned long long dspclock,
      float volume
    );
    FMOD_RESULT FMOD_ChannelGroup_AddFadePoint(
      FMOD_CHANNELGROUP *channelgroup,
      unsigned long long dspclock,
      float volume
    );

    RESULT ChannelControl.addFadePoint(
      ulong dspclock,
      float volume
    );

    Channel.addFadePoint(
      dspclock,
      volume
    );
    ChannelGroup.addFadePoint(
      dspclock,
      volume
    );

dspclock

  DSP clock of the parent ChannelGroup to set the fade point volume.

  - Units: Samples
volume

  Volume level at the given `dspclock`. Values above 1.0 amplify the signal.

  - Units: Linear
  - Range: [0, inf)

Fade points are scaled against other volume settings and in-between each fade point the volume will be linearly ramped.

To perform sample accurate fading use ChannelControl::getDSPClock to query the parent clock value. If a parent ChannelGroup changes its pitch, the fade points will still be correct as the parent clock rate is adjusted by that pitch.

    /* Example. Ramp from full volume to half volume over the next 4096 samples */
    unsigned long long parentclock;
    FMOD_ChannelControl_GetDSPClock(target, NULL, &parentclock);
    FMOD_ChannelControl_AddFadePoint(target, parentclock,        1.0f);
    FMOD_ChannelControl_AddFadePoint(target, parentclock + 4096, 0.5f);

    // Example. Ramp from full volume to half volume over the next 4096 samples
    unsigned long long parentclock;
    target->getDSPClock(nullptr, &parentclock);
    target->addFadePoint(parentclock,        1.0f);
    target->addFadePoint(parentclock + 4096, 0.5f);

See Also: ChannelControl::removeFadePoints, ChannelControl::setFadePointRamp, ChannelControl::getFadePoints

## FMOD_CHANNELCONTROL_CALLBACK

Callback for Channel or ChannelGroup notifications.

C
C++
C#
JS

    FMOD_RESULT F_CALLBACK FMOD_CHANNELCONTROL_CALLBACK(
      FMOD_CHANNELCONTROL *channelcontrol,
      FMOD_CHANNELCONTROL_TYPE controltype,
      FMOD_CHANNELCONTROL_CALLBACK_TYPE callbacktype,
      void *commanddata1,
      void *commanddata2
    );

    delegate RESULT CHANNELCONTROL_CALLBACK(
      IntPtr channelcontrol,
      CHANNELCONTROL_TYPE controltype,
      CHANNELCONTROL_CALLBACK_TYPE callbacktype,
      IntPtr commanddata1,
      IntPtr commanddata2
    );

    function FMOD_CHANNELCONTROL_CALLBACK(
      channelcontrol,
      controltype,
      callbacktype,
      commanddata1,
      commanddata2
    )

channelcontrol
  Base Channel or ChannelGroup handle. (ChannelControl)
controltype
  Identifier to distinguish between Channel and ChannelGroup. (FMOD_CHANNELCONTROL_TYPE)
callbacktype
  Type of callback. (FMOD_CHANNELCONTROL_CALLBACK_TYPE)
commanddata1 Opt
  First callback parameter, see FMOD_CHANNELCONTROL_CALLBACK_TYPE for details.
commanddata2 Opt
  Second callback parameter, see FMOD_CHANNELCONTROL_CALLBACK_TYPE for details.

The 'channelcontrol' argument can be cast to `FMOD::Channel *` or `FMOD::ChannelGroup *` given `controltype`.

The 'channelcontrol' argument can be cast to `FMOD_CHANNEL *` or `FMOD_CHANNELGROUP *` given `controltype`.

The 'channelcontrol' argument can be used via `Channel` or `ChannelGroup` by using `FMOD.Channel channel = new FMOD.Channel(channelcontrol);`

See Also: Callback Behavior, ChannelControl::setCallback

## FMOD_CHANNELCONTROL_CALLBACK_TYPE

Types of callbacks called by Channels and ChannelGroups.

C
C++
C#
JS

    typedef enum FMOD_CHANNELCONTROL_CALLBACK_TYPE {
      FMOD_CHANNELCONTROL_CALLBACK_END,
      FMOD_CHANNELCONTROL_CALLBACK_VIRTUALVOICE,
      FMOD_CHANNELCONTROL_CALLBACK_SYNCPOINT,
      FMOD_CHANNELCONTROL_CALLBACK_OCCLUSION,
      FMOD_CHANNELCONTROL_CALLBACK_MAX
    } FMOD_CHANNELCONTROL_CALLBACK_TYPE;

    enum CHANNELCONTROL_CALLBACK_TYPE : int
    {
      END,
      VIRTUALVOICE,
      SYNCPOINT,
      OCCLUSION,
      MAX,
    }

    CHANNELCONTROL_CALLBACK_END
    CHANNELCONTROL_CALLBACK_VIRTUALVOICE
    CHANNELCONTROL_CALLBACK_SYNCPOINT
    CHANNELCONTROL_CALLBACK_OCCLUSION
    CHANNELCONTROL_CALLBACK_MAX

FMOD_CHANNELCONTROL_CALLBACK_END
  Called when a sound ends. Supported by Channel only.
  `commanddata1`: Unused.
  `commanddata2`: Unused.
FMOD_CHANNELCONTROL_CALLBACK_VIRTUALVOICE
  Called when a Channel is made virtual or real. Supported by Channel objects only.
  `commanddata1`: (int) 0 represents 'virtual to real' and 1 represents 'real to virtual'.
  `commanddata2`: Unused.
FMOD_CHANNELCONTROL_CALLBACK_SYNCPOINT
  Called when a syncpoint is encountered. Can be from wav file markers or user added. Supported by Channel only.
  `commanddata1`: (int) representing the index of the sync point for use with Sound::getSyncPointInfo.
  `commanddata2`: Unused.
FMOD_CHANNELCONTROL_CALLBACK_OCCLUSION
  Called when geometry occlusion values are calculated. Can be used to clamp or change the value. Supported by Channel and ChannelGroup.
  `commanddata1`: (float *) representing the calculated direct occlusion value, can be modified.
  `commanddata2`: (float *) representing the calculated reverb occlusion value, can be modified.
FMOD_CHANNELCONTROL_CALLBACK_MAX
  Maximum number of callback types supported.

`commanddata1` and `commanddata2` are parameters passed into the callback and each callback may interpret them differently as specified above. See FMOD_CHANNELCONTROL_CALLBACK.

See Also: Callback Behavior, ChannelControl::setCallback

## FMOD_CHANNELCONTROL_DSP_INDEX

References to built in DSP positions that reside in a Channel or ChannelGroup DSP chain.

See DSP chain

C
C++
C#
JS

    typedef enum FMOD_CHANNELCONTROL_DSP_INDEX {
      FMOD_CHANNELCONTROL_DSP_HEAD  = -1,
      FMOD_CHANNELCONTROL_DSP_FADER = -2,
      FMOD_CHANNELCONTROL_DSP_TAIL  = -3
    } FMOD_CHANNELCONTROL_DSP_INDEX;

    struct CHANNELCONTROL_DSP_INDEX
    {
      const int HEAD  = -1;
      const int FADER = -2;
      const int TAIL  = -3;
    }

    CHANNELCONTROL_DSP_HEAD     = -1
    CHANNELCONTROL_DSP_FADER    = -2
    CHANNELCONTROL_DSP_TAIL     = -3

FMOD_CHANNELCONTROL_DSP_HEAD
  Head of the DSP chain, equivalent of index 0.
FMOD_CHANNELCONTROL_DSP_FADER
  Built in fader DSP.
FMOD_CHANNELCONTROL_DSP_TAIL
  Tail of the DSP chain, equivalent of the number of DSPs minus 1.

Before any DSPs have been added by the user, there is only one DSP available for a Channel or ChannelGroup. This is of type FMOD_DSP_TYPE_FADER. This handles volume and panning for a Channel or ChannelGroup.
As only 1 DSP exists by default, initially `CHANNELCONTROL_DSP_HEAD`, `CHANNELCONTROL_DSP_TAIL` and `CHANNELCONTROL_DSP_FADER` all reference the same DSP.

See Also: ChannelControl::getDSP, ChannelControl::getNumDSPs, ChannelControl::setDSPIndex

## ChannelControl::get3DAttributes

Retrieves the 3D position and velocity used to apply panning, attenuation and doppler.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::get3DAttributes(
      FMOD_VECTOR *pos,
      FMOD_VECTOR *vel
    );

    FMOD_RESULT FMOD_Channel_Get3DAttributes(
      FMOD_CHANNEL *channel,
      FMOD_VECTOR *pos,
      FMOD_VECTOR *vel
    );
    FMOD_RESULT FMOD_ChannelGroup_Get3DAttributes(
      FMOD_CHANNELGROUP *channelgroup,
      FMOD_VECTOR *pos,
      FMOD_VECTOR *vel
    );

    RESULT ChannelControl.get3DAttributes(
      out VECTOR pos,
      out VECTOR vel
    );

    Channel.get3DAttributes(
      pos,
      vel
    );
    ChannelGroup.get3DAttributes(
      pos,
      vel
    );

pos Out Opt

  Position in 3D space used for panning and attenuation. (FMOD_VECTOR)

  - Units: Distance units
vel Out Opt

  Velocity in 3D space used for doppler. (FMOD_VECTOR)

  - Units: Distance units per second

See Also: ChannelControl::set3DAttributes

## ChannelControl::get3DConeOrientation

Retrieves the orientation of a 3D cone shape, used for simulated occlusion.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::get3DConeOrientation(
      FMOD_VECTOR *orientation
    );

    FMOD_RESULT FMOD_Channel_Get3DConeOrientation(
      FMOD_CHANNEL *channel,
      FMOD_VECTOR *orientation
    );
    FMOD_RESULT FMOD_ChannelGroup_Get3DConeOrientation(
      FMOD_CHANNELGROUP *channelgroup,
      FMOD_VECTOR *orientation
    );

    RESULT ChannelControl.get3DConeOrientation(
      out VECTOR orientation
    );

    Channel.get3DConeOrientation(
      orientation
    );
    ChannelGroup.get3DConeOrientation(
      orientation
    );

orientation Out

  Normalized orientation vector, which represents the direction of the sound cone. (FMOD_VECTOR)

  - Default: (0, 0, 1)

See Also: ChannelControl::set3DConeOrientation

## ChannelControl::get3DConeSettings

Retrieves the angles and attenuation levels of a 3D cone shape, for simulated occlusion which is based on direction.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::get3DConeSettings(
      float *insideconeangle,
      float *outsideconeangle,
      float *outsidevolume
    );

    FMOD_RESULT FMOD_Channel_Get3DConeSettings(
      FMOD_CHANNEL *channel,
      float *insideconeangle,
      float *outsideconeangle,
      float *outsidevolume
    );
    FMOD_RESULT FMOD_ChannelGroup_Get3DConeSettings(
      FMOD_CHANNELGROUP *channelgroup,
      float *insideconeangle,
      float *outsideconeangle,
      float *outsidevolume
    );

    RESULT ChannelControl.get3DConeSettings(
      out float insideconeangle,
      out float outsideconeangle,
      out float outsidevolume
    );

    Channel.get3DConeSettings(
      insideconeangle,
      outsideconeangle,
      outsidevolume
    );
    ChannelGroup.get3DConeSettings(
      insideconeangle,
      outsideconeangle,
      outsidevolume
    );

insideconeangle Out Opt

  Inside cone angle. This is the angle spread within which the sound is unattenuated.

  - Units: Degrees
  - Range: [0, 360]
  - Default: 360
outsideconeangle Out Opt

  Outside cone angle. This is the angle spread outside of which the sound is attenuated to its `outsidevolume`.

  - Units: Degrees
  - Range: [0, 360]
  - Default: 360
outsidevolume Out Opt

  Cone outside volume.

  - Units: Linear
  - Range: [0, 1]
  - Default: 1

When ChannelControl::set3DConeOrientation is used and a 3D 'cone' is set up, attenuation will automatically occur for a sound based on the relative angle of the direction the cone is facing, vs the angle between the sound and the listener.

- If the relative angle is within the `insideconeangle`, the sound will not have any attenuation applied.
- If the relative angle is between the `insideconeangle` and `outsideconeangle`, linear volume attenuation (between 1 and `outsidevolume`) is applied between the two angles until it reaches the `outsideconeangle`.
- If the relative angle is outside of the `outsideconeangle` the volume does not attenuate any further.

See Also: ChannelControl::set3DConeSettings

## ChannelControl::get3DCustomRolloff

Retrieves the current custom rolloff shape for 3D distance attenuation.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::get3DCustomRolloff(
      FMOD_VECTOR **points,
      int *numpoints
    );

    FMOD_RESULT FMOD_Channel_Get3DCustomRolloff(
      FMOD_CHANNEL *channel,
      FMOD_VECTOR **points,
      int *numpoints
    );
    FMOD_RESULT FMOD_ChannelGroup_Get3DCustomRolloff(
      FMOD_CHANNELGROUP *channelgroup,
      FMOD_VECTOR **points,
      int *numpoints
    );

    RESULT ChannelControl.get3DCustomRolloff(
      out IntPtr points,
      out int numpoints
    );

    Channel.get3DCustomRolloff(
      points,
      numpoints
    );
    ChannelGroup.get3DCustomRolloff(
      points,
      numpoints
    );

points Out Opt

  Array of vectors sorted by distance, where `x` = distance and `y` = volume from 0 to 1. `z` is unused. (FMOD_VECTOR)

  - Units: Distance units
numpoints Out Opt
  Number of entries in the `points` array.

See Also: ChannelControl::set3DCustomRolloff

## ChannelControl::get3DDistanceFilter

Retrieves the override values for the 3D distance filter.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::get3DDistanceFilter(
      bool *custom,
      float *customLevel,
      float *centerFreq
    );

    FMOD_RESULT FMOD_Channel_Get3DDistanceFilter(
      FMOD_CHANNEL *channel,
      FMOD_BOOL *custom,
      float *customLevel,
      float *centerFreq
    );
    FMOD_RESULT FMOD_ChannelGroup_Get3DDistanceFilter(
      FMOD_CHANNELGROUP *channelgroup,
      FMOD_BOOL *custom,
      float *customLevel,
      float *centerFreq
    );

    RESULT ChannelControl.get3DDistanceFilter(
      out bool custom,
      out float customLevel,
      out float centerFreq
    );

    Channel.get3DDistanceFilter(
      custom,
      customLevel,
      centerFreq
    );
    ChannelGroup.get3DDistanceFilter(
      custom,
      customLevel,
      centerFreq
    );

custom Out Opt

  Override automatic distance filtering and use `customLevel` instead.

  - Units: Boolean
  - Default: False
customLevel Out Opt

  Attenuation factor where 1 represents no attenuation and 0 represents complete attenuation.

  - Range: [0, 1]
  - Default: 1
centerFreq Out Opt

  Center frequency of the band-pass filter used to simulate distance attenuation, 0 for default of FMOD_ADVANCEDSETTINGS::distanceFilterCenterFreq.

  - Units: Hertz
  - Range: [10, 22050]
  - Default: FMOD_ADVANCEDSETTINGS::distanceFilterCenterFreq

See Also: ChannelControl::set3DDistanceFilter

## ChannelControl::get3DDopplerLevel

Retrieves the amount by which doppler is scaled.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::get3DDopplerLevel(
      float *level
    );

    FMOD_RESULT FMOD_Channel_Get3DDopplerLevel(
      FMOD_CHANNEL *channel,
      float *level
    );
    FMOD_RESULT FMOD_ChannelGroup_Get3DDopplerLevel(
      FMOD_CHANNELGROUP *channelgroup,
      float *level
    );

    RESULT ChannelControl.get3DDopplerLevel(
      out float level
    );

    Channel.get3DDopplerLevel(
      level
    );
    ChannelGroup.get3DDopplerLevel(
      level
    );

level Out

  Doppler scale where 0 represents no doppler, 1 represents natural doppler and 5 represents exaggerated doppler.

  - Range: [0, 5]
  - Default: 1

See Also: ChannelControl::set3DDopplerLevel

## ChannelControl::get3DLevel

Retrieves the blend between 3D panning and 2D panning.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::get3DLevel(
      float *level
    );

    FMOD_RESULT FMOD_Channel_Get3DLevel(
      FMOD_CHANNEL *channel,
      float *level
    );
    FMOD_RESULT FMOD_ChannelGroup_Get3DLevel(
      FMOD_CHANNELGROUP *channelgroup,
      float *level
    );

    RESULT ChannelControl.get3DLevel(
      out float level
    );

    Channel.get3DLevel(
      level
    );
    ChannelGroup.get3DLevel(
      level
    );

level Out

  3D pan level where 0 represents panning/attenuating solely with 2D panning functions and 1 represents solely 3D.

  - Units: Linear
  - Range: [0, 1]
  - Default: 1

The FMOD_3D flag must be set on this object otherwise FMOD_ERR_NEEDS3D is returned.

2D functions include:

- ChannelControl::setPan
- ChannelControl::setMixLevelsOutput
- ChannelControl::setMixLevelsInput
- ChannelControl::setMixMatrix

3D functions include:

- ChannelControl::set3DAttributes
- ChannelControl::set3DConeOrientation
- ChannelControl::set3DCustomRolloff

See Also: ChannelControl::set3DLevel

## ChannelControl::get3DMinMaxDistance

Retrieves the minimum and maximum distances used to calculate the 3D rolloff attenuation.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::get3DMinMaxDistance(
      float *mindistance,
      float *maxdistance
    );

    FMOD_RESULT FMOD_Channel_Get3DMinMaxDistance(
      FMOD_CHANNEL *channel,
      float *mindistance,
      float *maxdistance
    );
    FMOD_RESULT FMOD_ChannelGroup_Get3DMinMaxDistance(
      FMOD_CHANNELGROUP *channelgroup,
      float *mindistance,
      float *maxdistance
    );

    RESULT ChannelControl.get3DMinMaxDistance(
      out float mindistance,
      out float maxdistance
    );

    Channel.get3DMinMaxDistance(
      mindistance,
      maxdistance
    );
    ChannelGroup.get3DMinMaxDistance(
      mindistance,
      maxdistance
    );

mindistance Out Opt

  Distance from the source where attenuation begins.

  - Units: Distance units
  - Range: [0, inf)
  - Default: 1
maxdistance Out Opt

  Distance from the source where attenuation ends.

  - Units: Distance units
  - Range: [`mindistance`, inf)
  - Default: 1

See Also: ChannelControl::set3DMinMaxDistance, System::set3DSettings

## ChannelControl::get3DOcclusion

Retrieves the 3D attenuation factors for the direct and reverb paths.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::get3DOcclusion(
      float *directocclusion,
      float *reverbocclusion
    );

    FMOD_RESULT FMOD_Channel_Get3DOcclusion(
      FMOD_CHANNEL *channel,
      float *directocclusion,
      float *reverbocclusion
    );
    FMOD_RESULT FMOD_ChannelGroup_Get3DOcclusion(
      FMOD_CHANNELGROUP *channelgroup,
      float *directocclusion,
      float *reverbocclusion
    );

    RESULT ChannelControl.get3DOcclusion(
      out float directocclusion,
      out float reverbocclusion
    );

    Channel.get3DOcclusion(
      directocclusion,
      reverbocclusion
    );
    ChannelGroup.get3DOcclusion(
      directocclusion,
      reverbocclusion
    );

directocclusion Out Opt

  Occlusion factor for the direct path where 0 represents no occlusion and 1 represents full occlusion.

  - Range: [0, 1]
  - Default: 0
reverbocclusion Out Opt

  Occlusion factor for the reverb path where 0 represents no occlusion and 1 represents full occlusion.

  - Range: [0, 1]
  - Default: 0

See Also: ChannelControl::set3DOcclusion

## ChannelControl::get3DSpread

Retrieves the spread of a 3D sound in speaker space.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::get3DSpread(
      float *angle
    );

    FMOD_RESULT FMOD_Channel_Get3DSpread(
      FMOD_CHANNEL *channel,
      float *angle
    );
    FMOD_RESULT FMOD_ChannelGroup_Get3DSpread(
      FMOD_CHANNELGROUP *channelgroup,
      float *angle
    );

    RESULT ChannelControl.get3DSpread(
      out float angle
    );

    Channel.get3DSpread(
      angle
    );
    ChannelGroup.get3DSpread(
      angle
    );

angle Out

  Angle over which the sound is spread.

  - Units: Degrees
  - Range: [0, 360]
  - Default: 0

See Also: ChannelControl::set3DSpread

## ChannelControl::getAudibility

Retrieves an estimation of the output volume.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::getAudibility(
      float *audibility
    );

    FMOD_RESULT FMOD_Channel_GetAudibility(
      FMOD_CHANNEL *channel,
      float *audibility
    );
    FMOD_RESULT FMOD_ChannelGroup_GetAudibility(
      FMOD_CHANNELGROUP *channelgroup,
      float *audibility
    );

    RESULT ChannelControl.getAudibility(
      out float audibility
    );

    Channel.getAudibility(
      audibility
    );
    ChannelGroup.getAudibility(
      audibility
    );

audibility Out
  Estimated audibility.

Estimated volume is calculated based on 3D spatialization, occlusion, API volume levels and DSPs used.

While this does not represent the actual waveform, Channels playing FSB files will take into consideration the overall peak level of the file (if available).

This value is used to determine which Channels should be audible and which Channels to virtualize when resources are limited.

See the Virtual Voice System white paper for more details about how audibility is calculated.

See Also: Channel::isVirtual, ChannelControl::getVolume, ChannelControl::get3DOcclusion, ChannelControl::get3DAttributes, FMOD_DSP_PARAMETER_OVERALLGAIN

## ChannelControl::getDelay

Retrieves a sample accurate start (and/or stop) time relative to the parent ChannelGroup DSP clock.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::getDelay(
      unsigned long long *dspclock_start,
      unsigned long long *dspclock_end,
      bool *stopchannels = nullptr
    );

    FMOD_RESULT FMOD_Channel_GetDelay(
      FMOD_CHANNEL *channel,
      unsigned long long *dspclock_start,
      unsigned long long *dspclock_end,
      FMOD_BOOL *stopchannels
    );
    FMOD_RESULT FMOD_ChannelGroup_GetDelay(
      FMOD_CHANNELGROUP *channelgroup,
      unsigned long long *dspclock_start,
      unsigned long long *dspclock_end,
      FMOD_BOOL *stopchannels
    );

    RESULT ChannelControl.getDelay(
      out ulong dspclock_start,
      out ulong dspclock_end
    );
    RESULT ChannelControl.getDelay(
      out ulong dspclock_start,
      out ulong dspclock_end,
      out bool stopchannels
    );

    Channel.getDelay(
      dspclock_start,
      dspclock_end,
      stopchannels
    );
    ChannelGroup.getDelay(
      dspclock_start,
      dspclock_end,
      stopchannels
    );

dspclock_start Out Opt

  DSP clock of the parent ChannelGroup to audibly start playing sound at.

  - Units: Samples
  - Default: 0
dspclock_end Out Opt

  DSP clock of the parent ChannelGroup to audibly stop playing sound at.

  - Units: Samples
  - Default: 0
stopchannels Out Opt

  True: When `dspclock_end` is reached, behaves like ChannelControl::stop has been called.
  False: When `dspclock_end` is reached, behaves like ChannelControl::setPaused has been called, a subsequent `dspclock_start` allows it to resume.

  - Units: Boolean

See Also: ChannelControl::setDelay,ChannelControl::getDSPClock

## ChannelControl::getDSP

Retrieves the DSP unit at the specified index in the DSP chain.

See DSP chain

C
C++
C#
JS

    FMOD_RESULT ChannelControl::getDSP(
      int index,
      DSP **dsp
    );

    FMOD_RESULT FMOD_Channel_GetDSP(
      FMOD_CHANNEL *channel,
      int index,
      FMOD_DSP **dsp
    );
    FMOD_RESULT FMOD_ChannelGroup_GetDSP(
      FMOD_CHANNELGROUP *channelgroup,
      int index,
      FMOD_DSP **dsp
    );

    RESULT ChannelControl.getDSP(
      int index,
      out DSP dsp
    );

    Channel.getDSP(
      index,
      dsp
    );
    ChannelGroup.getDSP(
      index,
      dsp
    );

index

  Offset into the DSP chain, see FMOD_CHANNELCONTROL_DSP_INDEX for special named offsets for 'head' and 'tail' and 'fader' units.

  - Range: [0, ChannelControl::getNumDSPs)
dsp Out
  DSP unit at the specified `index`. (DSP)

## ChannelControl::getDSPClock

Retrieves the DSP clock values at this point in time.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::getDSPClock(
      unsigned long long *dspclock,
      unsigned long long *parentclock
    );

    FMOD_RESULT FMOD_Channel_GetDSPClock(
      FMOD_CHANNEL *channel,
      unsigned long long *dspclock,
      unsigned long long *parentclock
    );
    FMOD_RESULT FMOD_ChannelGroup_GetDSPClock(
      FMOD_CHANNELGROUP *channelgroup,
      unsigned long long *dspclock,
      unsigned long long *parentclock
    );

    RESULT ChannelControl.getDSPClock(
      out ulong dspclock,
      out ulong parentclock
    );

    Channel.getDSPClock(
      dspclock,
      parentclock
    );
    ChannelGroup.getDSPClock(
      dspclock,
      parentclock
    );

dspclock Out Opt

  DSP clock value for the tail DSP (FMOD_CHANNELCONTROL_DSP_TAIL) node.

  - Units: Samples
parentclock Out Opt

  DSP clock value for the tail DSP (FMOD_CHANNELCONTROL_DSP_TAIL) node of the parent ChannelGroup.

  - Units: Samples

To perform sample accurate scheduling in conjunction with ChannelControl::setDelay and ChannelControl::addFadePoint query the `parentclock` value.

See Also: ChannelControl::getDelay

## ChannelControl::getDSPIndex

Retrieves the index of a DSP inside the Channel or ChannelGroup's DSP chain.

See DSP chain.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::getDSPIndex(
      DSP *dsp,
      int *index
    );

    FMOD_RESULT FMOD_Channel_GetDSPIndex(
      FMOD_CHANNEL *channel,
      FMOD_DSP *dsp,
      int *index
    );
    FMOD_RESULT FMOD_ChannelGroup_GetDSPIndex(
      FMOD_CHANNELGROUP *channelgroup,
      FMOD_DSP *dsp,
      int *index
    );

    RESULT ChannelControl.getDSPIndex(
      DSP dsp,
      out int index
    );

    Channel.getDSPIndex(
      dsp,
      index
    );
    ChannelGroup.getDSPIndex(
      dsp,
      index
    );

dsp
  DSP unit that exists in the DSP chain. (DSP)
index Out
  Offset into the DSP chain.

See Also: ChannelControl::setDSPIndex

## ChannelControl::getFadePoints

Retrieves information about stored fade points.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::getFadePoints(
      unsigned int *numpoints,
      unsigned long long *point_dspclock,
      float *point_volume
    );

    FMOD_RESULT FMOD_Channel_GetFadePoints(
      FMOD_CHANNEL *channel,
      unsigned int *numpoints,
      unsigned long long *point_dspclock,
      float *point_volume
    );
    FMOD_RESULT FMOD_ChannelGroup_GetFadePoints(
      FMOD_CHANNELGROUP *channelgroup,
      unsigned int *numpoints,
      unsigned long long *point_dspclock,
      float *point_volume
    );

    RESULT ChannelControl.getFadePoints(
      ref uint numpoints,
      ulong[] point_dspclock,
      float[] point_volume
    );

    Channel.getFadePoints(
      numpoints,
      point_dspclock,
      point_volume
    );
    ChannelGroup.getFadePoints(
      numpoints,
      point_dspclock,
      point_volume
    );

numpoints Out
  Number of fade points.
point_dspclock Out Opt

  Array of DSP clock values that represent the fade point times.

  - Units: Samples
point_volume Out Opt

  Array of volume levels that represent the fade point values.

  - Units: Linear
  - Range: [0, inf)

Passing NULL for `point_dspclock` and `point_volume` will allow you to query the number of fade points stored, with result stored in `numpoints`.
If `numpoints` is specified by the user, the value will be used as an input for the maximum number of fade points to output. It will then output as the number of fadepoints retrieved.

See Also: ChannelControl::addFadePoint, ChannelControl::setFadePointRamp, ChannelControl::removeFadePoints

## ChannelControl::getLowPassGain

Retrieves the gain of the dry signal when built in lowpass / distance filtering is applied.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::getLowPassGain(
      float *gain
    );

    FMOD_RESULT FMOD_Channel_GetLowPassGain(
      FMOD_CHANNEL *channel,
      float *gain
    );
    FMOD_RESULT FMOD_ChannelGroup_GetLowPassGain(
      FMOD_CHANNELGROUP *channelgroup,
      float *gain
    );

    RESULT ChannelControl.getLowPassGain(
      out float gain
    );

    Channel.getLowPassGain(
      gain
    );
    ChannelGroup.getLowPassGain(
      gain
    );

gain Out

  gain level where 0 represents silent (full filtering) and 1 represents full volume (no filtering).

  - Units: Linear
  - Range: [0, 1]
  - Default: 1

Requires the built in lowpass to be created with FMOD_INIT_CHANNEL_LOWPASS or FMOD_INIT_CHANNEL_DISTANCEFILTER.

Currently only supported for Channel, not ChannelGroup.

See Also: ChannelControl::setLowPassGain

## ChannelControl::getMixMatrix

Retrieves a 2 dimensional pan matrix that maps the signal from input channels (columns) to output speakers (rows).

C
C++
C#
JS

    FMOD_RESULT ChannelControl::getMixMatrix(
      float *matrix,
      int *outchannels,
      int *inchannels,
      int inchannel_hop = 0
    );

    FMOD_RESULT FMOD_Channel_GetMixMatrix(
      FMOD_CHANNEL *channel,
      float *matrix,
      int *outchannels,
      int *inchannels,
      int inchannel_hop
    );
    FMOD_RESULT FMOD_ChannelGroup_GetMixMatrix(
      FMOD_CHANNELGROUP *channelgroup,
      float *matrix,
      int *outchannels,
      int *inchannels,
      int inchannel_hop
    );

    RESULT ChannelControl.getMixMatrix(
      float[] matrix,
      out int outchannels,
      out int inchannels,
      int inchannel_hop = 0
    );

    Channel.getMixMatrix(
      matrix,
      outchannels,
      inchannels,
      inchannel_hop
    );
    ChannelGroup.getMixMatrix(
      matrix,
      outchannels,
      inchannels,
      inchannel_hop
    );

matrix Out Opt

  Two dimensional array of volume levels in row-major order. Each row represents an output speaker, each column represents an input channel.

  - Units: Linear
  - Range: (-inf, inf)
outchannels Out Opt
  Number of valid output channels (rows) in `matrix`.

- Range: [0, FMOD_MAX_CHANNEL_WIDTH]

inchannels Out Opt
  Number of valid input channels (columns) in `matrix`.

- Range: [0, FMOD_MAX_CHANNEL_WIDTH]

inchannel_hop Out Opt
  Width (total number of columns) in destination `matrix`. A matrix element is referenced as 'outchannel * inchannel_hop + inchannel'.

Passing NULL for `matrix` will allow you to query `outchannels` and `inchannels` otherwise they are not optional.

Matrix element values can be below 0 to invert a signal and above 1 to amplify the signal. Note that increasing the signal level too far may cause audible distortion.

See Also: ChannelControl::setMixMatrix

## ChannelControl::getMode

Retrieves the playback mode bits that control how this object behaves.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::getMode(
      FMOD_MODE *mode
    );

    FMOD_RESULT FMOD_Channel_GetMode(
      FMOD_CHANNEL *channel,
      FMOD_MODE *mode
    );
    FMOD_RESULT FMOD_ChannelGroup_GetMode(
      FMOD_CHANNELGROUP *channelgroup,
      FMOD_MODE *mode
    );

    RESULT ChannelControl.getMode(
      out MODE mode
    );

    Channel.getMode(
      mode
    );
    ChannelGroup.getMode(
      mode
    );

mode Out
  Playback mode bitfield. Test against a specific mode with the AND operator. (FMOD_MODE)

See Also: ChannelControl::setMode

## ChannelControl::getMute

Retrieves the mute state.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::getMute(
      bool *mute
    );

    FMOD_RESULT FMOD_Channel_GetMute(
      FMOD_CHANNEL *channel,
      FMOD_BOOL *mute
    );
    FMOD_RESULT FMOD_ChannelGroup_GetMute(
      FMOD_CHANNELGROUP *channelgroup,
      FMOD_BOOL *mute
    );

    RESULT ChannelControl.getMute(
      out bool mute
    );

    Channel.getMute(
      mute
    );
    ChannelGroup.getMute(
      mute
    );

mute Out

  Mute state. True = silent. False = audible.

  - Units: Boolean

An individual mute state is kept for each object, a parent ChannelGroup being muted will effectively mute this object however when queried the individual mute state is returned. ChannelControl::getAudibility can be used to calculate overall audibility for a Channel or ChannelGroup.

See Also: ChannelControl::setMute

## ChannelControl::getNumDSPs

Retrieves the number of DSP units in the DSP chain.

See DSP chain.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::getNumDSPs(
      int *numdsps
    );

    FMOD_RESULT FMOD_Channel_GetNumDSPs(
      FMOD_CHANNEL *channel,
      int *numdsps
    );
    FMOD_RESULT FMOD_ChannelGroup_GetNumDSPs(
      FMOD_CHANNELGROUP *channelgroup,
      int *numdsps
    );

    RESULT ChannelControl.getNumDSPs(
      out int numdsps
    );

    Channel.getNumDSPs(
      numdsps
    );
    ChannelGroup.getNumDSPs(
      numdsps
    );

numdsps Out
  Number of DSP units in the DSP chain.

See Also: ChannelControl::addDSP, ChannelControl::removeDSP, ChannelControl::getDSP

## ChannelControl::getPaused

Retrieves the paused state.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::getPaused(
      bool *paused
    );

    FMOD_RESULT FMOD_Channel_GetPaused(
      FMOD_CHANNEL *channel,
      FMOD_BOOL *paused
    );
    FMOD_RESULT FMOD_ChannelGroup_GetPaused(
      FMOD_CHANNELGROUP *channelgroup,
      FMOD_BOOL *paused
    );

    RESULT ChannelControl.getPaused(
      out bool paused
    );

    Channel.getPaused(
      paused
    );
    ChannelGroup.getPaused(
      paused
    );

paused Out

  Paused state. True = playback halted. False = playback active.

  - Units: Boolean

An individual pause state is kept for each object, a parent ChannelGroup being paused will effectively pause this object however when queried the individual pause state is returned.

See Also: ChannelControl::setPaused

## ChannelControl::getPitch

Retrieves the relative pitch / playback rate.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::getPitch(
      float *pitch
    );

    FMOD_RESULT FMOD_Channel_GetPitch(
      FMOD_CHANNEL *channel,
      float *pitch
    );
    FMOD_RESULT FMOD_ChannelGroup_GetPitch(
      FMOD_CHANNELGROUP *channelgroup,
      float *pitch
    );

    RESULT ChannelControl.getPitch(
      out float pitch
    );

    Channel.getPitch(
      pitch
    );
    ChannelGroup.getPitch(
      pitch
    );

pitch Out
  Pitch value where 0.5 represents half pitch (one octave down), 1 represents unmodified pitch and 2 represents double pitch (one octave up).

An individual pitch value is kept for each object, a parent ChannelGroup pitch will effectively scale the pitch of this object however when queried the individual pitch value is returned.

See Also: ChannelControl::setPitch

## ChannelControl::getReverbProperties

Retrieves the wet / send level for a particular reverb instance.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::getReverbProperties(
      int instance,
      float *wet
    );

    FMOD_RESULT FMOD_Channel_GetReverbProperties(
      FMOD_CHANNEL *channel,
      int instance,
      float *wet
    );
    FMOD_RESULT FMOD_ChannelGroup_GetReverbProperties(
      FMOD_CHANNELGROUP *channelgroup,
      int instance,
      float *wet
    );

    RESULT ChannelControl.getReverbProperties(
      int instance,
      out float wet
    );

    Channel.getReverbProperties(
      instance,
      wet
    );
    ChannelGroup.getReverbProperties(
      instance,
      wet
    );

instance

  Reverb instance index.

  - Range: [0, FMOD_REVERB_MAXINSTANCES]
wet Out

  Send level for the signal to the reverb. 0 = none, 1 = full.

  - Units: Linear
  - Range: (-inf, inf)
  - Default: 1 for Channel, 0 for ChannelGroup

See Also: ChannelControl::setReverbProperties

## ChannelControl::getSystemObject

Retrieves the System that created this object.

C
C++
C#
JS

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

    FMOD_RESULT FMOD_Channel_GetSystemObject(
      FMOD_CHANNEL *channel,
      FMOD_SYSTEM **system
    );
    FMOD_RESULT FMOD_ChannelGroup_GetSystemObject(
      FMOD_CHANNELGROUP *channelgroup,
      FMOD_SYSTEM **system
    );

    RESULT ChannelControl.getSystemObject(
      out System system
    );

    Channel.getSystemObject(
      system
    );
    ChannelGroup.getSystemObject(
      system
    );

system Out
  System object. (System)

See Also: System::createChannelGroup, System::getMasterChannelGroup, System::playSound

## ChannelControl::getUserData

Retrieves a user value associated with this object.

C
C++
C#
JS

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

    FMOD_RESULT FMOD_Channel_GetUserData(
      FMOD_CHANNEL *channel,
      void **userdata
    );
    FMOD_RESULT FMOD_ChannelGroup_GetUserData(
      FMOD_CHANNELGROUP *channelgroup,
      void **userdata
    );

    RESULT ChannelControl.getUserData(
      out IntPtr userdata
    );

    Channel.getUserData(
      userdata
    );
    ChannelGroup.getUserData(
      userdata
    );

userdata Out
  Value stored on this object.

See Also: ChannelControl::setUserData

## ChannelControl::getVolume

Retrieves the volume level.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::getVolume(
      float *volume
    );

    FMOD_RESULT FMOD_Channel_GetVolume(
      FMOD_CHANNEL *channel,
      float *volume
    );
    FMOD_RESULT FMOD_ChannelGroup_GetVolume(
      FMOD_CHANNELGROUP *channelgroup,
      float *volume
    );

    RESULT ChannelControl.getVolume(
      out float volume
    );

    Channel.getVolume(
      volume
    );
    ChannelGroup.getVolume(
      volume
    );

volume Out

  Volume level.

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

See Also: ChannelControl::setVolume

## ChannelControl::getVolumeRamp

Retrieves whether volume changes are ramped or instantaneous.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::getVolumeRamp(
      bool *ramp
    );

    FMOD_RESULT FMOD_Channel_GetVolumeRamp(
      FMOD_CHANNEL *channel,
      FMOD_BOOL *ramp
    );
    FMOD_RESULT FMOD_ChannelGroup_GetVolumeRamp(
      FMOD_CHANNELGROUP *channelgroup,
      FMOD_BOOL *ramp
    );

    RESULT ChannelControl.getVolumeRamp(
      out bool ramp
    );

    Channel.getVolumeRamp(
      ramp
    );
    ChannelGroup.getVolumeRamp(
      ramp
    );

ramp Out

  Ramp state. True = volume change is ramped. False = volume change is instantaeous.

  - Units: Boolean
  - Default: True

See Also: ChannelControl::setVolumeRamp

## ChannelControl::isPlaying

Retrieves the playing state.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::isPlaying(
      bool *isplaying
    );

    FMOD_RESULT FMOD_Channel_IsPlaying(
      FMOD_CHANNEL *channel,
      FMOD_BOOL *isplaying
    );
    FMOD_RESULT FMOD_ChannelGroup_IsPlaying(
      FMOD_CHANNELGROUP *channelgroup,
      FMOD_BOOL *isplaying
    );

    RESULT ChannelControl.isPlaying(
      out bool isplaying
    );

    Channel.isPlaying(
      isplaying
    );
    ChannelGroup.isPlaying(
      isplaying
    );

isplaying Out

  Playing state.

  - Units: Boolean

A Channel is considered playing after System::playSound or System::playDSP, even if it is paused.

A ChannelGroup is considered playing if it has any playing Channels.

## ChannelControl::removeDSP

Removes the specified DSP unit from the DSP chain.

See DSP chain

C
C++
C#
JS

    FMOD_RESULT ChannelControl::removeDSP(
      DSP *dsp
    );

    FMOD_RESULT FMOD_Channel_RemoveDSP(
      FMOD_CHANNEL *channel,
      FMOD_DSP *dsp
    );
    FMOD_RESULT FMOD_ChannelGroup_RemoveDSP(
      FMOD_CHANNELGROUP *channelgroup,
      FMOD_DSP *dsp
    );

    RESULT ChannelControl.removeDSP(
      DSP dsp
    );

    Channel.removeDSP(
      dsp
    );
    ChannelGroup.removeDSP(
      dsp
    );

dsp
  DSP unit to be removed. (DSP)

See Also: ChannelControl::addDSP, ChannelControl::getDSP, ChannelControl::getNumDSPs

## ChannelControl::removeFadePoints

Removes all fade points between the two specified clock values (inclusive).

C
C++
C#
JS

    FMOD_RESULT ChannelControl::removeFadePoints(
      unsigned long long dspclock_start,
      unsigned long long dspclock_end
    );

    FMOD_RESULT FMOD_Channel_RemoveFadePoints(
      FMOD_CHANNEL *channel,
      unsigned long long dspclock_start,
      unsigned long long dspclock_end
    );
    FMOD_RESULT FMOD_ChannelGroup_RemoveFadePoints(
      FMOD_CHANNELGROUP *channelgroup,
      unsigned long long dspclock_start,
      unsigned long long dspclock_end
    );

    RESULT ChannelControl.removeFadePoints(
      ulong dspclock_start,
      ulong dspclock_end
    );

    Channel.removeFadePoints(
      dspclock_start,
      dspclock_end
    );
    ChannelGroup.removeFadePoints(
      dspclock_start,
      dspclock_end
    );

dspclock_start

  DSP clock of the parent ChannelGroup at which to begin removing fade points.

  - Units: Samples
dspclock_end

  DSP clock of the parent ChannelGroup at which to stop removing fade points.

  - Units: Samples

See Also: ChannelControl::addFadePoint, ChannelControl::setFadePointRamp, ChannelControl::getFadePoints

## ChannelControl::set3DAttributes

Sets the 3D position and velocity used to apply panning, attenuation and doppler.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::set3DAttributes(
      const FMOD_VECTOR *pos,
      const FMOD_VECTOR *vel
    );

    FMOD_RESULT FMOD_Channel_Set3DAttributes(
      FMOD_CHANNEL *channel,
      const FMOD_VECTOR *pos,
      const FMOD_VECTOR *vel
    );
    FMOD_RESULT FMOD_ChannelGroup_Set3DAttributes(
      FMOD_CHANNELGROUP *channelgroup,
      const FMOD_VECTOR *pos,
      const FMOD_VECTOR *vel
    );

    RESULT ChannelControl.set3DAttributes(
      ref VECTOR pos,
      ref VECTOR vel
    );
    RESULT ChannelControl.set3DAttributes(
      ref VECTOR pos,
      ref VECTOR vel
    );

    Channel.set3DAttributes(
      pos,
      vel
    );
    ChannelGroup.set3DAttributes(
      pos,
      vel
    );

pos Opt

  Position in 3D space used for panning and attenuation. (FMOD_VECTOR)

  - Units: Distance units
vel Opt

  Velocity in 3D space used for doppler. (FMOD_VECTOR)

  - Units: Distance units per second

The FMOD_3D flag must be set on this object otherwise FMOD_ERR_NEEDS3D is returned.

Vectors must be provided in the correct handedness.

For a stereo 3D sound, you can set the spread of the left/right parts in speaker space by using ChannelControl::set3DSpread.

See Also: ChannelControl::get3DAttributes

## ChannelControl::set3DConeOrientation

Sets the orientation of a 3D cone shape, used for simulated occlusion.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::set3DConeOrientation(
      FMOD_VECTOR *orientation
    );

    FMOD_RESULT FMOD_Channel_Set3DConeOrientation(
      FMOD_CHANNEL *channel,
      FMOD_VECTOR *orientation
    );
    FMOD_RESULT FMOD_ChannelGroup_Set3DConeOrientation(
      FMOD_CHANNELGROUP *channelgroup,
      FMOD_VECTOR *orientation
    );

    RESULT ChannelControl.set3DConeOrientation(
      ref VECTOR orientation
    );

    Channel.set3DConeOrientation(
      orientation
    );
    ChannelGroup.set3DConeOrientation(
      orientation
    );

orientation

  Normalized orientation vector, which represents the direction of the sound cone. (FMOD_VECTOR)

  - Default: (0, 0, 1)

The FMOD_3D flag must be set on this object otherwise FMOD_ERR_NEEDS3D is returned.

This function has no effect unless ChannelControl::set3DConeSettings has been used to change the cone inside/outside angles from the default.

Vectors must be provided in the correct handedness.

See Also: ChannelControl::get3DConeOrientation

## ChannelControl::set3DConeSettings

Sets the angles and attenuation levels of a 3D cone shape, for simulated occlusion which is based on direction.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::set3DConeSettings(
      float insideconeangle,
      float outsideconeangle,
      float outsidevolume
    );

    FMOD_RESULT FMOD_Channel_Set3DConeSettings(
      FMOD_CHANNEL *channel,
      float insideconeangle,
      float outsideconeangle,
      float outsidevolume
    );
    FMOD_RESULT FMOD_ChannelGroup_Set3DConeSettings(
      FMOD_CHANNELGROUP *channelgroup,
      float insideconeangle,
      float outsideconeangle,
      float outsidevolume
    );

    RESULT ChannelControl.set3DConeSettings(
      float insideconeangle,
      float outsideconeangle,
      float outsidevolume
    );

    Channel.set3DConeSettings(
      insideconeangle,
      outsideconeangle,
      outsidevolume
    );
    ChannelGroup.set3DConeSettings(
      insideconeangle,
      outsideconeangle,
      outsidevolume
    );

insideconeangle

  Inside cone angle. This is the angle spread within which the sound is unattenuated.

  - Units: Degrees
  - Range: [0, `outsideconeangle`]
  - Default: 360
outsideconeangle

  Outside cone angle. This is the angle spread outside of which the sound is attenuated to its `outsidevolume`.

  - Units: Degrees
  - Range: [`insideconeangle`, 360]
  - Default: 360
outsidevolume

  Cone outside volume.

  - Units: Linear
  - Range: [0, 1]
  - Default: 1

The FMOD_3D flag must be set on this object otherwise FMOD_ERR_NEEDS3D is returned.

When ChannelControl::set3DConeOrientation is used and a 3D 'cone' is set up, attenuation will automatically occur for a sound based on the relative angle of the direction the cone is facing, vs the angle between the sound and the listener.

- If the relative angle is within the `insideconeangle`, the sound will not have any attenuation applied.
- If the relative angle is between the `insideconeangle` and `outsideconeangle`, linear volume attenuation (between 1 and `outsidevolume`) is applied between the two angles until it reaches the `outsideconeangle`.
- If the relative angle is outside of the `outsideconeangle` the volume does not attenuate any further.

See Also: ChannelControl::get3DConeSettings, Sound::set3DConeSettings

## ChannelControl::set3DCustomRolloff

Sets a custom rolloff shape for 3D distance attenuation.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::set3DCustomRolloff(
      FMOD_VECTOR *points,
      int numpoints
    );

    FMOD_RESULT FMOD_Channel_Set3DCustomRolloff(
      FMOD_CHANNEL *channel,
      FMOD_VECTOR *points,
      int numpoints
    );
    FMOD_RESULT FMOD_ChannelGroup_Set3DCustomRolloff(
      FMOD_CHANNELGROUP *channelgroup,
      FMOD_VECTOR *points,
      int numpoints
    );

    RESULT ChannelControl.set3DCustomRolloff(
      ref VECTOR points,
      int numpoints
    );

    Channel.set3DCustomRolloff(
      points,
      numpoints
    );
    ChannelGroup.set3DCustomRolloff(
      points,
      numpoints
    );

points

  Array of vectors sorted by distance, where `x` = distance and `y` = volume from 0 to 1. `z` should be set to 0. Pass null or equivalen to disable custom rolloff. (FMOD_VECTOR)

  - Units: Distance units
numpoints
  Number of `points`.

Must be used in conjunction with FMOD_3D_CUSTOMROLLOFF flag to be activated.

This function does not duplicate the memory for the points internally. The memory you pass to FMOD must remain valid while in use.

If FMOD_3D_CUSTOMROLLOFF is set and the rolloff shape is not set, FMOD will revert to FMOD_3D_INVERSEROLLOFF rolloff method.

When a custom rolloff is specified a Channel or ChannelGroup's 3D 'minimum' and 'maximum' distances are ignored.

The distance in-between point values is linearly interpolated until the final point where the last value is held.

If the points are not sorted by distance, an error will result.

    // Defining a custom array of points
    FMOD_VECTOR curve[3] =
    {
        { 0.0f,  1.0f, 0.0f },
        { 2.0f,  0.2f, 0.0f },
        { 20.0f, 0.0f, 0.0f }
    };

See Also: Sound::set3DCustomRolloff, ChannelControl::get3DCustomRolloff

## ChannelControl::set3DDistanceFilter

Sets an override value for the 3D distance filter.

If distance filtering is enabled, by default the 3D engine will automatically attenuate frequencies using a lowpass and a highpass filter, based on 3D distance.
This function allows the distance filter effect to be set manually, or to be set back to 'automatic' mode.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::set3DDistanceFilter(
      bool custom,
      float customLevel,
      float centerFreq
    );

    FMOD_RESULT FMOD_Channel_Set3DDistanceFilter(
      FMOD_CHANNEL *channel,
      FMOD_BOOL custom,
      float customLevel,
      float centerFreq
    );
    FMOD_RESULT FMOD_ChannelGroup_Set3DDistanceFilter(
      FMOD_CHANNELGROUP *channelgroup,
      FMOD_BOOL custom,
      float customLevel,
      float centerFreq
    );

    RESULT ChannelControl.set3DDistanceFilter(
      bool custom,
      float customLevel,
      float centerFreq
    );

    Channel.set3DDistanceFilter(
      custom,
      customLevel,
      centerFreq
    );
    ChannelGroup.set3DDistanceFilter(
      custom,
      customLevel,
      centerFreq
    );

custom

  Override automatic distance filtering and use `customLevel` instead.

  - Units: Boolean
  - Default: False
customLevel

  Attenuation factor where 1 represents no attenuation and 0 represents complete attenuation.

  - Range: [0, 1]
  - Default: 1
centerFreq Opt

  Center frequency of the band-pass filter used to simulate distance attenuation, 0 for default.

  - Units: Hertz
  - Range: [10, 22050]
  - Default: FMOD_ADVANCEDSETTINGS::distanceFilterCenterFreq

The FMOD_3D flag must be set on this object otherwise FMOD_ERR_NEEDS3D is returned.

The System must be initialized with FMOD_INIT_CHANNEL_DISTANCEFILTER for this feature to work.

Currently only supported for Channel, not ChannelGroup.

See Also: ChannelControl::get3DDistanceFilter

## ChannelControl::set3DDopplerLevel

Sets the amount by which doppler is scaled.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::set3DDopplerLevel(
      float level
    );

    FMOD_RESULT FMOD_Channel_Set3DDopplerLevel(
      FMOD_CHANNEL *channel,
      float level
    );
    FMOD_RESULT FMOD_ChannelGroup_Set3DDopplerLevel(
      FMOD_CHANNELGROUP *channelgroup,
      float level
    );

    RESULT ChannelControl.set3DDopplerLevel(
      float level
    );

    Channel.set3DDopplerLevel(
      level
    );
    ChannelGroup.set3DDopplerLevel(
      level
    );

level

  Doppler scale where 0 represents no doppler, 1 represents natural doppler and 5 represents exaggerated doppler.

  - Range: [0, 5]
  - Default: 1

The FMOD_3D flag must be set on this object otherwise FMOD_ERR_NEEDS3D is returned.

The doppler effect will disabled if System::set3DNumListeners is given a value greater than 1.

Currently only supported for Channel, not ChannelGroup.

See Also: ChannelControl::get3DDopplerLevel, System::set3DSettings

## ChannelControl::set3DLevel

Sets the blend between 3D panning and 2D panning.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::set3DLevel(
      float level
    );

    FMOD_RESULT FMOD_Channel_Set3DLevel(
      FMOD_CHANNEL *channel,
      float level
    );
    FMOD_RESULT FMOD_ChannelGroup_Set3DLevel(
      FMOD_CHANNELGROUP *channelgroup,
      float level
    );

    RESULT ChannelControl.set3DLevel(
      float level
    );

    Channel.set3DLevel(
      level
    );
    ChannelGroup.set3DLevel(
      level
    );

level

  3D pan level where 0 represents panning/attenuating solely with 2D panning functions and 1 represents solely 3D.

  - Units: Linear
  - Range: [0, 1]
  - Default: 1

The FMOD_3D flag must be set on this object otherwise FMOD_ERR_NEEDS3D is returned.

2D functions include:

- ChannelControl::setPan
- ChannelControl::setMixLevelsOutput
- ChannelControl::setMixLevelsInput
- ChannelControl::setMixMatrix

3D functions include:

- ChannelControl::set3DAttributes
- ChannelControl::set3DConeOrientation
- ChannelControl::set3DCustomRolloff

See Also: ChannelControl::get3DLevel

## ChannelControl::set3DMinMaxDistance

Sets the minimum and maximum distances used to calculate the 3D rolloff attenuation.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::set3DMinMaxDistance(
      float mindistance,
      float maxdistance
    );

    FMOD_RESULT FMOD_Channel_Set3DMinMaxDistance(
      FMOD_CHANNEL *channel,
      float mindistance,
      float maxdistance
    );
    FMOD_RESULT FMOD_ChannelGroup_Set3DMinMaxDistance(
      FMOD_CHANNELGROUP *channelgroup,
      float mindistance,
      float maxdistance
    );

    RESULT ChannelControl.set3DMinMaxDistance(
      float mindistance,
      float maxdistance
    );

    Channel.set3DMinMaxDistance(
      mindistance,
      maxdistance
    );
    ChannelGroup.set3DMinMaxDistance(
      mindistance,
      maxdistance
    );

mindistance

  Distance from the source where attenuation begins.

  - Units: Distance units
  - Range: [0, `maxdistance`]
  - Default: 1
maxdistance

  Distance from the source where attenuation ends.

  - Units: Distance units
  - Range: [`mindistance`, inf)
  - Default: 10000

When the listener is within the minimum distance of the sound source the 3D volume will be at its maximum. As the listener moves from the minimum distance to the maximum distance the sound will attenuate following the rolloff curve set. When outside the maximum distance the sound will no longer attenuate.

Attenuation in 3D space is controlled by the rolloff mode, these are FMOD_3D_INVERSEROLLOFF, FMOD_3D_LINEARROLLOFF, FMOD_3D_LINEARSQUAREROLLOFF, FMOD_3D_INVERSETAPEREDROLLOFF, FMOD_3D_CUSTOMROLLOFF.

Minimum distance is useful to give the impression that the sound is loud or soft in 3D space.
A sound with a small 3D minimum distance in a typical (non custom) rolloff mode will make the sound appear small, and the sound will attenuate quickly.
A sound with a large minimum distance will make the sound appear larger.

The FMOD_3D flag must be set on this object otherwise FMOD_ERR_NEEDS3D is returned.

To define the min and max distance per Sound instead of Channel or ChannelGroup use Sound::set3DMinMaxDistance.

If FMOD_3D_CUSTOMROLLOFF has been set on this object these values are stored, but ignored in 3D processing.

See Also: ChannelControl::get3DMinMaxDistance

## ChannelControl::set3DOcclusion

Sets the 3D attenuation factors for the direct and reverb paths.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::set3DOcclusion(
      float directocclusion,
      float reverbocclusion
    );

    FMOD_RESULT FMOD_Channel_Set3DOcclusion(
      FMOD_CHANNEL *channel,
      float directocclusion,
      float reverbocclusion
    );
    FMOD_RESULT FMOD_ChannelGroup_Set3DOcclusion(
      FMOD_CHANNELGROUP *channelgroup,
      float directocclusion,
      float reverbocclusion
    );

    RESULT ChannelControl.set3DOcclusion(
      float directocclusion,
      float reverbocclusion
    );

    Channel.set3DOcclusion(
      directocclusion,
      reverbocclusion
    );
    ChannelGroup.set3DOcclusion(
      directocclusion,
      reverbocclusion
    );

directocclusion

  Occlusion factor for the direct path where 0 represents no occlusion and 1 represents full occlusion.

  - Range: [0, 1]
  - Default: 0
reverbocclusion

  Occlusion factor for the reverb path where 0 represents no occlusion and 1 represents full occlusion.

  - Range: [0, 1]
  - Default: 0

There is a reverb path/send when ChannelControl::setReverbProperties has been used, `reverbocclusion` controls its attenuation.

If the System has been initialized with FMOD_INIT_CHANNEL_DISTANCEFILTER or FMOD_INIT_CHANNEL_LOWPASS the `directocclusion` is applied as frequency filtering rather than volume attenuation.

See Also: ChannelControl::get3DOcclusion

## ChannelControl::set3DSpread

Sets the spread of a 3D sound in speaker space.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::set3DSpread(
      float angle
    );

    FMOD_RESULT FMOD_Channel_Set3DSpread(
      FMOD_CHANNEL *channel,
      float angle
    );
    FMOD_RESULT FMOD_ChannelGroup_Set3DSpread(
      FMOD_CHANNELGROUP *channelgroup,
      float angle
    );

    RESULT ChannelControl.set3DSpread(
      float angle
    );

    Channel.set3DSpread(
      angle
    );
    ChannelGroup.set3DSpread(
      angle
    );

angle

  Angle over which the sound is spread.

  - Units: Degrees
  - Range: [0, 360]
  - Default: 0

When the spread angle is 0 (default) a multi-channel signal will collapse to mono and be spatialized to a single point based on ChannelControl::set3DAttributes calculations. As the angle is increased, each channel within a multi-channel signal will be rotated away from that point. For 2, 4, 6, 8, and 12 channel signals, the spread is arranged from leftmost speaker to rightmost speaker intelligently, for example in 5.1 the leftmost speaker is rear left, followed by front left, center, front right then finally rear right as the rightmost speaker (LFE is not spread). For other channel counts the individual channels are spread evenly in the order of the signal. As the signal is spread the power will be preserved.

For a stereo signal given different spread angles:

- 0: Sound is collapsed to mono and spatialized to a single point.
- 90: Left channel is rotated 45 degrees to the left compared with angle=0 and the right channel 45 degrees to the right.
- 180: Left channel is rotated 90 degrees to the left compared with angle=0 and the right channel 90 degrees to the right.
- 360: Left channel is rotated 180 degrees to the left and the right channel 180 degrees to the right. This means the sound is collapsed to mono and spatialized to a single point in the opposite direction compared with (angle=0).

See Also: ChannelControl::get3DSpread

## ChannelControl::setCallback

Sets the callback for ChannelControl level notifications.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::setCallback(
      FMOD_CHANNELCONTROL_CALLBACK callback
    );

    FMOD_RESULT FMOD_Channel_SetCallback(
      FMOD_CHANNEL *channel,
      FMOD_CHANNELCONTROL_CALLBACK callback
    );
    FMOD_RESULT FMOD_ChannelGroup_SetCallback(
      FMOD_CHANNELGROUP *channelgroup,
      FMOD_CHANNELCONTROL_CALLBACK callback
    );

    RESULT ChannelControl.setCallback(
      CHANNEL_CALLBACK callback
    );

    Channel.setCallback(
      callback
    );
    ChannelGroup.setCallback(
      callback
    );

callback
  Callback to invoke. (FMOD_CHANNELCONTROL_CALLBACK)

See Also: Callback Behavior, FMOD_CHANNELCONTROL_CALLBACK_TYPE

## ChannelControl::setDelay

Sets a sample accurate start (and/or stop) time relative to the parent ChannelGroup DSP clock.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::setDelay(
      unsigned long long dspclock_start,
      unsigned long long dspclock_end,
      bool stopchannels = true
    );

    FMOD_RESULT FMOD_Channel_SetDelay(
      FMOD_CHANNEL *channel,
      unsigned long long dspclock_start,
      unsigned long long dspclock_end,
      FMOD_BOOL stopchannels
    );
    FMOD_RESULT FMOD_ChannelGroup_SetDelay(
      FMOD_CHANNELGROUP *channelgroup,
      unsigned long long dspclock_start,
      unsigned long long dspclock_end,
      FMOD_BOOL stopchannels
    );

    RESULT ChannelControl.setDelay(
      ulong dspclock_start,
      ulong dspclock_end,
      bool stopchannels = true
    );

    Channel.setDelay(
      dspclock_start,
      dspclock_end,
      stopchannels
    );
    ChannelGroup.setDelay(
      dspclock_start,
      dspclock_end,
      stopchannels
    );

dspclock_start Opt

  DSP clock of the parent ChannelGroup to audibly start playing sound at.

  - Units: Samples
  - Default: 0
dspclock_end Opt

  DSP clock of the parent ChannelGroup to audibly stop playing sound at.

  - Units: Samples
  - Default: 0
stopchannels

  True: When `dspclock_end` is reached, behaves like ChannelControl::stop has been called.
  False: When `dspclock_end` is reached, behaves like ChannelControl::setPaused has been called, a subsequent `dspclock_start` allows it to resume.

  - Units: Boolean

To perform sample accurate scheduling use ChannelControl::getDSPClock to query the parent clock value. If a parent ChannelGroup changes its pitch, the start and stop times will still be correct as the parent clock rate is adjusted by that pitch.

See Also: ChannelControl::getDelay

## ChannelControl::setDSPIndex

Sets the index in the DSP chain of the specified DSP.

See DSP chain.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::setDSPIndex(
      DSP *dsp,
      int index
    );

    FMOD_RESULT FMOD_Channel_SetDSPIndex(
      FMOD_CHANNEL *channel,
      FMOD_DSP *dsp,
      int index
    );
    FMOD_RESULT FMOD_ChannelGroup_SetDSPIndex(
      FMOD_CHANNELGROUP *channelgroup,
      FMOD_DSP *dsp,
      int index
    );

    RESULT ChannelControl.setDSPIndex(
      DSP dsp,
      int index
    );

    Channel.setDSPIndex(
      dsp,
      index
    );
    ChannelGroup.setDSPIndex(
      dsp,
      index
    );

dsp
  DSP unit that exists in the DSP chain. (DSP)
index
  Offset into the DSP chain to move the DSP to, see FMOD_CHANNELCONTROL_DSP_INDEX for special named offsets.

This will move a DSP already in the DSP chain to a new offset.

See Also: ChannelControl::getDSPIndex

## ChannelControl::setFadePointRamp

Adds a volume ramp at the specified time in the future using fade points.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::setFadePointRamp(
      unsigned long long dspclock,
      float volume
    );

    FMOD_RESULT FMOD_Channel_SetFadePointRamp(
      FMOD_CHANNEL *channel,
      unsigned long long dspclock,
      float volume
    );
    FMOD_RESULT FMOD_ChannelGroup_SetFadePointRamp(
      FMOD_CHANNELGROUP *channelgroup,
      unsigned long long dspclock,
      float volume
    );

    RESULT ChannelControl.setFadePointRamp(
      ulong dspclock,
      float volume
    );

    Channel.setFadePointRamp(
      dspclock,
      volume
    );
    ChannelGroup.setFadePointRamp(
      dspclock,
      volume
    );

dspclock

  Time at which the ramp will end, as measured by the DSP clock of the parent ChannelGroup.

  - Units: Samples
volume

  Volume level at the given `dspclock`. 0 = silent, 1 = full.

  - Units: Linear
  - Range: [0, inf)

This is a convenience function that creates a scheduled 64 sample fade point ramp from the current volume level to `volume` arriving at `dspclock` time.

Can be use in conjunction with ChannelControl::SetDelay.

All fade points after `dspclock` will be removed.

See Also: ChannelControl::removeFadePoints, ChannelControl::addFadePoint, ChannelControl::getFadePoints

## ChannelControl::setLowPassGain

Sets the gain of the dry signal when built in lowpass / distance filtering is applied.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::setLowPassGain(
      float gain
    );

    FMOD_RESULT FMOD_Channel_SetLowPassGain(
      FMOD_CHANNEL *channel,
      float gain
    );
    FMOD_RESULT FMOD_ChannelGroup_SetLowPassGain(
      FMOD_CHANNELGROUP *channelgroup,
      float gain
    );

    RESULT ChannelControl.setLowPassGain(
      float gain
    );

    Channel.setLowPassGain(
      gain
    );
    ChannelGroup.setLowPassGain(
      gain
    );

gain

  gain level where 0 represents silent (full filtering) and 1 represents full volume (no filtering).

  - Units: Linear
  - Range: [0, 1]
  - Default: 1

Requires the built in lowpass to be created with FMOD_INIT_CHANNEL_LOWPASS or FMOD_INIT_CHANNEL_DISTANCEFILTER.

Currently only supported for Channel, not ChannelGroup.

See Also: ChannelControl::getLowPassGain

## ChannelControl::setMixLevelsInput

Sets the incoming volume level for each channel of a multi-channel signal.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::setMixLevelsInput(
      float *levels,
      int numlevels
    );

    FMOD_RESULT FMOD_Channel_SetMixLevelsInput(
      FMOD_CHANNEL *channel,
      float *levels,
      int numlevels
    );
    FMOD_RESULT FMOD_ChannelGroup_SetMixLevelsInput(
      FMOD_CHANNELGROUP *channelgroup,
      float *levels,
      int numlevels
    );

    RESULT ChannelControl.setMixLevelsInput(
      float[] levels,
      int numlevels
    );

    Channel.setMixLevelsInput(
      levels,
      numlevels
    );
    ChannelGroup.setMixLevelsInput(
      levels,
      numlevels
    );

levels

  Array of volume levels for each incoming channel. Volume level. 0 = silent, 1 = full. Negative level inverts the signal. Values larger than 1 amplify the signal.

  - Units: Linear
  - Range: (-inf, inf)
numlevels

  Number of levels in the array.

  - Range: [1, FMOD_MAX_CHANNEL_WIDTH]

This is a convenience function to avoid passing a matrix, it will overwrite values set via ChannelControl::setPan, ChannelControl::setMixLevelsOutput and ChannelControl::setMixMatrix.

Currently only supported for Channel, not ChannelGroup.

See Also: ChannelControl::getMixMatrix

## ChannelControl::setMixLevelsOutput

Sets the outgoing volume levels for each speaker.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::setMixLevelsOutput(
      float frontleft,
      float frontright,
      float center,
      float lfe,
      float surroundleft,
      float surroundright,
      float backleft,
      float backright
    );

    FMOD_RESULT FMOD_Channel_SetMixLevelsOutput(
      FMOD_CHANNEL *channel,
      float frontleft,
      float frontright,
      float center,
      float lfe,
      float surroundleft,
      float surroundright,
      float backleft,
      float backright
    );
    FMOD_RESULT FMOD_ChannelGroup_SetMixLevelsOutput(
      FMOD_CHANNELGROUP *channelgroup,
      float frontleft,
      float frontright,
      float center,
      float lfe,
      float surroundleft,
      float surroundright,
      float backleft,
      float backright
    );

    RESULT ChannelControl.setMixLevelsOutput(
      float frontleft,
      float frontright,
      float center,
      float lfe,
      float surroundleft,
      float surroundright,
      float backleft,
      float backright
    );

    Channel.setMixLevelsOutput(
      frontleft,
      frontright,
      center,
      lfe,
      surroundleft,
      surroundright,
      backleft,
      backright
    );
    ChannelGroup.setMixLevelsOutput(
      frontleft,
      frontright,
      center,
      lfe,
      surroundleft,
      surroundright,
      backleft,
      backright
    );

frontleft

  Volume level for FMOD_SPEAKER_FRONT_LEFT. Volume level. 0 = silent, 1 = full. Negative level inverts the signal. Values larger than 1 amplify the signal.

  - Units: Linear
  - Range: (-inf, inf)
frontright

  Volume level for FMOD_SPEAKER_FRONT_RIGHT. Volume level. 0 = silent, 1 = full. Negative level inverts the signal. Values larger than 1 amplify the signal.

  - Units: Linear
  - Range: (-inf, inf)
center

  Volume level for FMOD_SPEAKER_FRONT_CENTER. Volume level. 0 = silent, 1 = full. Negative level inverts the signal. Values larger than 1 amplify the signal.

  - Units: Linear
  - Range: (-inf, inf)
lfe

  Volume level for FMOD_SPEAKER_LOW_FREQUENCY. Volume level. 0 = silent, 1 = full. Negative level inverts the signal. Values larger than 1 amplify the signal.

  - Units: Linear
  - Range: (-inf, inf)
surroundleft

  Volume level for FMOD_SPEAKER_SURROUND_LEFT. Volume level. 0 = silent, 1 = full. Negative level inverts the signal. Values larger than 1 amplify the signal.

  - Units: Linear
  - Range: (-inf, inf)
surroundright

  Volume level for FMOD_SPEAKER_SURROUND_RIGHT. Volume level. 0 = silent, 1 = full. Negative level inverts the signal. Values larger than 1 amplify the signal.

  - Units: Linear
  - Range: (-inf, inf)
backleft

  Volume level for FMOD_SPEAKER_BACK_LEFT. Volume level. 0 = silent, 1 = full. Negative level inverts the signal. Values larger than 1 amplify the signal.

  - Units: Linear
  - Range: (-inf, inf)
backright

  Volume level for FMOD_SPEAKER_BACK_RIGHT. Volume level. 0 = silent, 1 = full. Negative level inverts the signal. Values larger than 1 amplify the signal.

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

Specify the level for a given output speaker, if the channel count of the input and output do not match, channels will be up/down mixed as appropriate to approximate the given speaker values. For example stereo input with 5.1 output will use the `center` parameter to distribute signal to the center speaker from front left and front right channels.

This is a convenience function to avoid passing a matrix, it will overwrite values set via ChannelControl::setPan, ChannelControl::setMixLevelsInput and ChannelControl::setMixMatrix.

The output channel count will always match the System speaker mode set via System::setSoftwareFormat.

If the System is initialized with FMOD_SPEAKERMODE_RAW calling this function will produce silence.

See Also: ChannelControl::getMixMatrix

## ChannelControl::setMixMatrix

Sets a 2 dimensional pan matrix that maps the signal from input channels (columns) to output speakers (rows).

C
C++
C#
JS

    FMOD_RESULT ChannelControl::setMixMatrix(
      float *matrix,
      int outchannels,
      int inchannels,
      int inchannel_hop = 0
    );

    FMOD_RESULT FMOD_Channel_SetMixMatrix(
      FMOD_CHANNEL *channel,
      float *matrix,
      int outchannels,
      int inchannels,
      int inchannel_hop
    );
    FMOD_RESULT FMOD_ChannelGroup_SetMixMatrix(
      FMOD_CHANNELGROUP *channelgroup,
      float *matrix,
      int outchannels,
      int inchannels,
      int inchannel_hop
    );

    RESULT ChannelControl.setMixMatrix(
      float[] matrix,
      int outchannels,
      int inchannels,
      int inchannel_hop = 0
    );

    Channel.setMixMatrix(
      matrix,
      outchannels,
      inchannels,
      inchannel_hop
    );
    ChannelGroup.setMixMatrix(
      matrix,
      outchannels,
      inchannels,
      inchannel_hop
    );

matrix Opt

  Two dimensional array of volume levels in row-major order. Each row represents an output speaker, each column represents an input channel.

  - Units: Linear
  - Range: (-inf, inf)
outchannels

  Number of output channels (rows) in `matrix`.

  - Range: [0, FMOD_MAX_CHANNEL_WIDTH]
inchannels

  Number of input channels (columns) in `matrix`.

  - Range: [0, FMOD_MAX_CHANNEL_WIDTH]
inchannel_hop Opt
  Width (total number of columns) in source `matrix`. A matrix element is referenced as 'outchannel * inchannel_hop + inchannel'.

- Range: [0, FMOD_MAX_CHANNEL_WIDTH]
- Default: `inchannels`

This will overwrite values set via ChannelControl::setPan, ChannelControl::setMixLevelsInput and ChannelControl::setMixLevelsOutput.

If no matrix is passed in via `matrix` a default upmix, downmix, or unit matrix will take its place. A unit matrix allows a signal to pass through unchanged.

Example 5.1 unit matrix:

    1 0 0 0 0 0
    0 1 0 0 0 0
    0 0 1 0 0 0
    0 0 0 1 0 0
    0 0 0 0 1 0
    0 0 0 0 0 1

Matrix element values can be below 0 to invert a signal and above 1 to amplify the signal. Note that increasing the signal level too far may cause audible distortion.

See Also: ChannelControl::getMixMatrix

## ChannelControl::setMode

Sets the playback mode that controls how this object behaves.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::setMode(
      FMOD_MODE mode
    );

    FMOD_RESULT FMOD_Channel_SetMode(
      FMOD_CHANNEL *channel,
      FMOD_MODE mode
    );
    FMOD_RESULT FMOD_ChannelGroup_SetMode(
      FMOD_CHANNELGROUP *channelgroup,
      FMOD_MODE mode
    );

    RESULT ChannelControl.setMode(
      MODE mode
    );

    Channel.setMode(
      mode
    );
    ChannelGroup.setMode(
      mode
    );

mode
  Playback mode. More than one mode can be set at once by combining them with the OR operator. (FMOD_MODE)

Modes supported:

- FMOD_LOOP_OFF
- FMOD_LOOP_NORMAL
- FMOD_LOOP_BIDI
- FMOD_2D
- FMOD_3D
- FMOD_3D_HEADRELATIVE
- FMOD_3D_WORLDRELATIVE
- FMOD_3D_INVERSEROLLOFF
- FMOD_3D_LINEARROLLOFF
- FMOD_3D_LINEARSQUAREROLLOFF
- FMOD_3D_INVERSETAPEREDROLLOFF
- FMOD_3D_CUSTOMROLLOFF
- FMOD_3D_IGNOREGEOMETRY
- FMOD_VIRTUAL_PLAYFROMSTART

When changing the loop mode, sounds created with System::createStream or FMOD_CREATESTREAM may have already been pre-buffered and executed their loop logic ahead of time before this call was even made. This is dependent on the size of the sound versus the size of the stream decode buffer (see FMOD_CREATESOUNDEXINFO). If this happens, you may need to reflush the stream buffer by calling Channel::setPosition. Note this will usually only happen if you have sounds or loop points that are smaller than the stream decode buffer size.

When changing the loop mode of sounds created with with System::createSound or FMOD_CREATESAMPLE, if the sound was set up as FMOD_LOOP_OFF, then set to FMOD_LOOP_NORMAL with this function, the sound may click when playing the end of the sound. This is because the sound needs to be prepared for looping using Sound::setMode, by modifying the content of the PCM data (i.e. data past the end of the actual sample data) to allow the interpolators to read ahead without clicking. If you use ChannelControl::setMode it will not do this (because different Channels may have different loop modes for the same sound) and may click if you try to set it to looping on an unprepared sound. If you want to change the loop mode at runtime it may be better to load the sound as looping first (or use Sound::setMode), to let it prepare the data as if it was looping so that it does not click whenever ChannelControl::setMode is used to turn looping on.

If FMOD_3D_IGNOREGEOMETRY or FMOD_VIRTUAL_PLAYFROMSTART is not specified, the flag will be cleared if it was specified previously.

See Also: ChannelControl::getMode

## ChannelControl::setMute

Sets the mute state.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::setMute(
      bool mute
    );

    FMOD_RESULT FMOD_Channel_SetMute(
      FMOD_CHANNEL *channel,
      FMOD_BOOL mute
    );
    FMOD_RESULT FMOD_ChannelGroup_SetMute(
      FMOD_CHANNELGROUP *channelgroup,
      FMOD_BOOL mute
    );

    RESULT ChannelControl.setMute(
      bool mute
    );

    Channel.setMute(
      mute
    );
    ChannelGroup.setMute(
      mute
    );

mute

  Mute state. True = silent. False = audible.

  - Units: Boolean

Mute is an additional control for volume, the effect of which is equivalent to setting the volume to zero.

An individual mute state is kept for each object, muting a parent ChannelGroup will effectively mute this object however when queried the individual mute state is returned. ChannelControl::getAudibility can be used to calculate overall audibility for a Channel or ChannelGroup.

See Also: ChannelControl::getMute

## ChannelControl::setPan

Sets the left/right pan level.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::setPan(
      float pan
    );

    FMOD_RESULT FMOD_Channel_SetPan(
      FMOD_CHANNEL *channel,
      float pan
    );
    FMOD_RESULT FMOD_ChannelGroup_SetPan(
      FMOD_CHANNELGROUP *channelgroup,
      float pan
    );

    RESULT ChannelControl.setPan(
      float pan
    );

    Channel.setPan(
      pan
    );
    ChannelGroup.setPan(
      pan
    );

pan

  Pan level where -1 represents full left, 0 represents center and 1 represents full right.

  - Range: [-1, 1]
  - Default: 0

This is a convenience function to avoid passing a matrix, it will overwrite values set via ChannelControl::setMixLevelsInput, ChannelControl::setMixLevelsOutput and ChannelControl::setMixMatrix.

Mono inputs are panned from left to right using constant power panning (non linear fade). Stereo and greater inputs will isolate the front left and right input channels and fade them up and down based on the pan value (silencing other channels). The output channel count will always match the System speaker mode set via System::setSoftwareFormat.

If the System is initialized with FMOD_SPEAKERMODE_RAW calling this function will produce silence.

See Also: ChannelControl::getMixMatrix

## ChannelControl::setPaused

Sets the paused state.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::setPaused(
      bool paused
    );

    FMOD_RESULT FMOD_Channel_SetPaused(
      FMOD_CHANNEL *channel,
      FMOD_BOOL paused
    );
    FMOD_RESULT FMOD_ChannelGroup_SetPaused(
      FMOD_CHANNELGROUP *channelgroup,
      FMOD_BOOL paused
    );

    RESULT ChannelControl.setPaused(
      bool paused
    );

    Channel.setPaused(
      paused
    );
    ChannelGroup.setPaused(
      paused
    );

paused

  Paused state. True = playback halted. False = playback active.

  - Units: Boolean

Pause halts playback which effectively freezes Channel::getPosition and ChannelControl::getDSPClock values.

An individual pause state is kept for each object, pausing a parent ChannelGroup will effectively pause this object however when queried the individual pause state is returned.

See Also: ChannelControl::getPaused

## ChannelControl::setPitch

Sets the relative pitch / playback rate.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::setPitch(
      float pitch
    );

    FMOD_RESULT FMOD_Channel_SetPitch(
      FMOD_CHANNEL *channel,
      float pitch
    );
    FMOD_RESULT FMOD_ChannelGroup_SetPitch(
      FMOD_CHANNELGROUP *channelgroup,
      float pitch
    );

    RESULT ChannelControl.setPitch(
      float pitch
    );

    Channel.setPitch(
      pitch
    );
    ChannelGroup.setPitch(
      pitch
    );

pitch
  Pitch value where 0.5 represents half pitch (one octave down), 1.0 represents unmodified pitch and 2.0 represents double pitch (one octave up).

Scales playback frequency of Channel object or if issued on a ChannelGroup it scales the frequencies of all Channels contained in the ChannelGroup.

An individual pitch value is kept for each object, changing the pitch of a parent ChannelGroup will effectively alter the pitch of this object however when queried the individual pitch value is returned.

See Also: ChannelControl::getPitch, Channel::setFrequency, Channel::getFrequency

## ChannelControl::setReverbProperties

Sets the wet / send level for a particular reverb instance.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::setReverbProperties(
      int instance,
      float wet
    );

    FMOD_RESULT FMOD_Channel_SetReverbProperties(
      FMOD_CHANNEL *channel,
      int instance,
      float wet
    );
    FMOD_RESULT FMOD_ChannelGroup_SetReverbProperties(
      FMOD_CHANNELGROUP *channelgroup,
      int instance,
      float wet
    );

    RESULT ChannelControl.setReverbProperties(
      int instance,
      float wet
    );

    Channel.setReverbProperties(
      instance,
      wet
    );
    ChannelGroup.setReverbProperties(
      instance,
      wet
    );

instance

  Reverb instance index.

  - Range: [0, FMOD_REVERB_MAXINSTANCES]
wet

  Send level for the signal to the reverb. 0 = none, 1 = full. Negative level inverts the signal.

  - Units: Linear
  - Range: (-inf, inf)
  - Default: 1 for Channel, 0 for ChannelGroup

Channels are automatically connected to all existing reverb instances due to the default wet level of 1. ChannelGroups however will not send to any reverb by default requiring an explicit call to this function.

ChannelGroup reverb is optimal for the case where you want to send 1 mixed signal to the reverb, rather than a lot of individual Channel reverb sends. It is advisable to do this to reduce CPU if you have many Channels inside a ChannelGroup.

When setting a wet level for a ChannelGroup, any Channels under that ChannelGroup will still have their existing sends to the reverb. To avoid this doubling up you should explicitly set the Channel wet levels to 0.

See Also: ChannelControl::getReverbProperties

## ChannelControl::setUserData

Sets a user value associated with this object.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::setUserData(
      void *userdata
    );

    FMOD_RESULT FMOD_Channel_SetUserData(
      FMOD_CHANNEL *channel,
      void *userdata
    );
    FMOD_RESULT FMOD_ChannelGroup_SetUserData(
      FMOD_CHANNELGROUP *channelgroup,
      void *userdata
    );

    RESULT ChannelControl.setUserData(
      IntPtr userdata
    );

    Channel.setUserData(
      userdata
    );
    ChannelGroup.setUserData(
      userdata
    );

userdata
  Value stored on this object.

Associates some data with this object to give it context, it will be passed back via callbacks but otherwise remain untouched.

See Also: ChannelControl::getUserData, ChannelControl::setCallback

## ChannelControl::setVolume

Sets the volume level.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::setVolume(
      float volume
    );

    FMOD_RESULT FMOD_Channel_SetVolume(
      FMOD_CHANNEL *channel,
      float volume
    );
    FMOD_RESULT FMOD_ChannelGroup_SetVolume(
      FMOD_CHANNELGROUP *channelgroup,
      float volume
    );

    RESULT ChannelControl.setVolume(
      float volume
    );

    Channel.setVolume(
      volume
    );
    ChannelGroup.setVolume(
      volume
    );

volume

  Volume level. 0 = silent, 1 = full. Negative level inverts the signal. Values larger than 1 amplify the signal.

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

To define the volume per Sound use Sound::setDefaults.

Setting `volume` at a level higher than 1 can lead to distortion/clipping.

See Also: ChannelControl::getVolume

## ChannelControl::setVolumeRamp

Sets whether volume changes are ramped or instantaneous.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::setVolumeRamp(
      bool ramp
    );

    FMOD_RESULT FMOD_Channel_SetVolumeRamp(
      FMOD_CHANNEL *channel,
      FMOD_BOOL ramp
    );
    FMOD_RESULT FMOD_ChannelGroup_SetVolumeRamp(
      FMOD_CHANNELGROUP *channelgroup,
      FMOD_BOOL ramp
    );

    RESULT ChannelControl.setVolumeRamp(
      bool ramp
    );

    Channel.setVolumeRamp(
      ramp
    );
    ChannelGroup.setVolumeRamp(
      ramp
    );

ramp

  Ramp state. True = volume change is ramped. False = volume change is instantaeous.

  - Units: Boolean
  - Default: True

Volume changes when not paused will be ramped to the target value to avoid a pop sound, this function allows that setting to be overridden and volume changes to be applied immediately.

See Also: ChannelControl::getVolumeRamp

## ChannelControl::stop

Stops the Channel (or all Channels in nested ChannelGroups) from playing.

C
C++
C#
JS

    FMOD_RESULT ChannelControl::stop();

    FMOD_RESULT FMOD_Channel_Stop(FMOD_CHANNEL *channel);
    FMOD_RESULT FMOD_ChannelGroup_Stop(FMOD_CHANNELGROUP *channelgroup);

    RESULT ChannelControl.stop();

    Channel.stop();
    ChannelGroup.stop();

This will free up internal resources for reuse by the virtual Channel system.

See Also: System::playSound

## FMOD_CHANNELCONTROL_TYPE

Identifier used to distinguish between Channel and ChannelGroup in the ChannelControl callback.

C
C++
C#
JS

    typedef enum FMOD_CHANNELCONTROL_TYPE {
      FMOD_CHANNELCONTROL_CHANNEL,
      FMOD_CHANNELCONTROL_CHANNELGROUP,
      FMOD_CHANNELCONTROL_MAX,
    } FMOD_CHANNELCONTROL_TYPE;

    enum CHANNELCONTROL_TYPE : int
    {
        CHANNEL,
        CHANNELGROUP,
        MAX
    }

    CHANNELCONTROL_CHANNEL
    CHANNELCONTROL_CHANNELGROUP
    CHANNELCONTROL_MAX

FMOD_CHANNELCONTROL_CHANNEL
  Type representing Channel
FMOD_CHANNELCONTROL_CHANNELGROUP
  Type representing ChannelGroup
FMOD_CHANNELCONTROL_MAX
  Maximum number of channel control types.

See Also: ChannelControl::setCallback