Namespace: Un4seen.Bass
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.2
[DllImportAttribute("bass")] public static int BASS_ChannelSetFX( int handle, BASSFXType type, int priority )
Parameters
- handle
- Type: SystemInt32
The channel handle... a HSTREAM, HMUSIC, or HRECORD. - type
- Type: Un4seen.BassBASSFXType
One of the following types of effect (see BASSFXType):Other effects may be supported by add-ons, e.g. BASS_FX:BASS_FX_DX8_CHORUS DX8 Chorus. Use BASS_DX8_CHORUS structure to set/get parameters. BASS_FX_DX8_COMPRESSOR DX8 Compression. Use BASS_DX8_COMPRESSOR structure to set/get parameters. BASS_FX_DX8_DISTORTION DX8 Distortion. Use BASS_DX8_DISTORTION structure to set/get parameters. BASS_FX_DX8_ECHO DX8 Echo. Use BASS_DX8_ECHO structure to set/get parameters. BASS_FX_DX8_FLANGER DX8 Flanger. Use BASS_DX8_FLANGER structure to set/get parameters. BASS_FX_DX8_GARGLE DX8 Gargle. Use BASS_DX8_GARGLE structure to set/get parameters. BASS_FX_DX8_I3DL2REVERB DX8 I3DL2 (Interactive 3D Audio Level 2) reverb. Use BASS_DX8_I3DL2REVERB structure to set/get parameters. BASS_FX_DX8_PARAMEQ DX8 Parametric equalizer. Use BASS_DX8_PARAMEQ structure to set/get parameters. BASS_FX_DX8_REVERB DX8 Reverb. Use BASS_DX8_REVERB structure to set/get parameters. BASS_FX_VOLUME Volume level adjustment. Use BASS_FX_VOLUME_PARAM structure to set/get parameters. BASS_FX_BFX_MIX BASS_FX Channel Swap/Remap/Downmix. Use BASS_BFX_MIX structure to set/get parameters. BASS_FX_BFX_ROTATE BASS_FX Channel Rotate. Use BASS_BFX_ROTATE structure to set/get parameters. BASS_FX_BFX_VOLUME BASS_FX Volume. Use BASS_BFX_VOLUME structure to set/get parameters. BASS_FX_BFX_PEAKEQ BASS_FX Peaking Equalizer. Use BASS_BFX_PEAKEQ structure to set/get parameters. BASS_FX_BFX_DAMP BASS_FX Dynamic Amplification. Use BASS_BFX_DAMP structure to set/get parameters. BASS_FX_BFX_AUTOWAH BASS_FX Auto Wah. Use BASS_BFX_AUTOWAH structure to set/get parameters. BASS_FX_BFX_PHASER BASS_FX Phaser. Use BASS_BFX_PHASER structure to set/get parameters. BASS_FX_BFX_ECHO4 BASS_FX Echo 3. Use BASS_BFX_ECHO3 structure to set/get parameters. BASS_FX_BFX_CHORUS BASS_FX Chorus. Use BASS_BFX_CHORUS structure to set/get parameters. BASS_FX_BFX_BQF BASS_FX BiQuad Filter. Use BASS_BFX_BQF structure to set/get parameters. BASS_FX_BFX_DISTORTION BASS_FX Distortion. Use BASS_BFX_DISTORTION structure to set/get parameters. BASS_FX_BFX_COMPRESSOR2 BASS_FX Compressor. Use BASS_BFX_COMPRESSOR2 structure to set/get parameters. BASS_FX_BFX_VOLUME_ENV BASS_FX volume envelope effect. Use BASS_BFX_VOLUME_ENV structure to set/get parameters. - priority
- Type: SystemInt32
The priority of the new FX, which determines it's 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
Type: Int32If succesful, then the new effect's handle is returned, else 0 is returned. Use BASS_ErrorGetCode to get the error code.
Multiple effects may be used per channel. Use BASS_ChannelRemoveFX(Int32, Int32) to remove an effect. Use BASS_FXSetParameters(Int32, Object) 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.
Platform-specific
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.
ERROR CODE | Description |
---|---|
BASS_ERROR_HANDLE | handle is not a valid channel. |
BASS_ERROR_ILLTYPE | An illegal type was specified. |
BASS_ERROR_NOFX | DX8 effects are unavailable. |
BASS_ERROR_FORMAT | The channel's format is not supported by the effect. It may be floating-point (without DX9) or more than stereo. |
BASS_ERROR_UNKNOWN | Some other mystery problem! |
Platform-specific
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. On Windows CE, only PARAMEQ is supported.
BASS_DX8_ECHO echo = new BASS_DX8_ECHO(90f, 50f, 500f, 500f, true); int channel = Bass.BASS_StreamCreateFile("test.mp3", 0, 0, BASSFlag.BASS_DEFAULT); int fxEchoHandle = Bass.BASS_ChannelSetFX(channel, BASSFXType.BASS_FX_ECHO, 1); ... // changing the echo effect, dry/wet mix... echo.fWetDryMix = 50f; Bass.BASS_FXSetParameters(fxEchoHandle, echo);