BASS_ChannelSetFX
Sets an effect on a stream, MOD music, or recording channel.
HFX BASS_ChannelSetFX( DWORD handle, DWORD type, int priority );
Parameters
handle | The channel handle... a HSTREAM, HMUSIC, or HRECORD. | ||||||||||||||||||
type | One of the following types of effect.
| ||||||||||||||||||
priority | The priority of the new FX, which determines its position in the DSP chain. DSP/FX with higher priority are applied before those with lower. This parameter has no effect with DX8 effects when the "with FX flag" DX8 effect implementation is used. |
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_HANDLE | handle is not a valid channel. |
BASS_ERROR_ILLTYPE | type is invalid. |
BASS_ERROR_NOFX | The specified DX8 effect is unavailable. |
BASS_ERROR_FORMAT | The channel's format is not supported by the effect. |
BASS_ERROR_UNKNOWN | Some other mystery problem! |
Remarks
Multiple effects may be used per channel. Use BASS_ChannelRemoveFX to remove an effect. Use BASS_FXSetParameters to set an effect's parameters.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.
Depending on the DX8 effect implementation being used by the channel, the channel may have to be stopped before adding or removing DX8 effects on it. If necessary, that is done automatically and the channel is resumed afterwards.