Sets an effect on a stream, MOD music, or recording channel.

HFX BASS_ChannelSetFX(
    DWORD handle,
    DWORD type,
    int priority


handleThe channel handle... a HSTREAM, HMUSIC, or HRECORD.
typeOne of the following types of effect.
BASS_FX_DX8_CHORUSDX8 Chorus. Use BASS_DX8_CHORUS structure to set/get parameters.
BASS_FX_DX8_COMPRESSORDX8 Compression. Use BASS_DX8_COMPRESSOR structure to set/get parameters.
BASS_FX_DX8_DISTORTIONDX8 Distortion. Use BASS_DX8_DISTORTION structure to set/get parameters.
BASS_FX_DX8_ECHODX8 Echo. Use BASS_DX8_ECHO structure to set/get parameters.
BASS_FX_DX8_FLANGERDX8 Flanger. Use BASS_DX8_FLANGER structure to set/get parameters.
BASS_FX_DX8_GARGLEDX8 Gargle. Use BASS_DX8_GARGLE structure to set/get parameters.
BASS_FX_DX8_I3DL2REVERBDX8 I3DL2 (Interactive 3D Audio Level 2) reverb. Use BASS_DX8_I3DL2REVERB structure to set/get parameters.
BASS_FX_DX8_PARAMEQDX8 Parametric equalizer. Use BASS_DX8_PARAMEQ structure to set/get parameters.
BASS_FX_DX8_REVERBDX8 Reverb. Use BASS_DX8_REVERB structure to set/get parameters.
BASS_FX_VOLUMEVolume level adjustment. Use BASS_FX_VOLUME_PARAM structure to set/get parameters.
other effects may be supported by add-ons, eg. BASS_FX.
priorityThe priority of the new FX, which determines its position in the DSP chain. DSP/FX with higher priority are applied before those with lower.

Return value

If successful, then the new effect's handle is returned, else 0 is returned. Use BASS_ErrorGetCode to get the error code.

Error codes

BASS_ERROR_HANDLEhandle is not a valid channel.
BASS_ERROR_ILLTYPEtype is invalid.
BASS_ERROR_NOFXThe specified DX8 effect is unavailable.
BASS_ERROR_FORMATThe channel's format is not supported by the effect.
BASS_ERROR_UNKNOWNSome other mystery problem!


Multiple effects may be used per channel. Use BASS_ChannelRemoveFX to remove an effect. Use BASS_FXSetParameters to set an effect's parameters. An effect's priority value can be changed via BASS_FXSetPriority.

Effects can be applied to MOD musics and streams, but not samples. If you want to apply an effect to a sample, you could use a stream instead.


DX8 effects are a Windows feature requiring DirectX 8, or DirectX 9 for floating-point support. On other platforms, they are emulated by BASS, except for the following which are currently unsupported: COMPRESSOR, GARGLE, and I3DL2REVERB.

See also

BASS_ChannelLock, BASS_ChannelRemoveFX, BASS_FXGetParameters, BASS_FXReset, BASS_FXSetParameters, BASS_FXSetPriority, BASS_ChannelSetDSP, BASS_CONFIG_FLOATDSP