BASS.NET API for the Un4seen BASS Audio Library

BassBASS_FXSetParameters Method (Int32, Object)

BASS.NET API for the Un4seen BASS Audio Library
Sets the parameters of an effect.

Namespace:  Un4seen.Bass
Assembly:  Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax

public static bool BASS_FXSetParameters(
	int handle,
	Object par
)

Parameters

handle
Type: SystemInt32
The effect handle.
par
Type: SystemObject
An instance of an effect parameter structures.

Additional effect parameter structures might be implemented by add-ons.

Return Value

Type: Boolean
If successful, is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
Remarks

The structure used depends on the effect type.

For DX8 effects you might use: BASS_DX8_CHORUS, BASS_DX8_COMPRESSOR, BASS_DX8_DISTORTION, BASS_DX8_ECHO, BASS_DX8_FLANGER, BASS_DX8_GARGLE, BASS_DX8_I3DL2REVERB, BASS_DX8_PARAMEQ, BASS_DX8_REVERB.

For BASS_FX DSP effetcs you might use: BASS_BFX_VOLUME, BASS_BFX_ROTATE, BASS_BFX_PHASER, BASS_BFX_PEAKEQ, BASS_BFX_ECHO4, BASS_BFX_DISTORTION, BASS_BFX_DAMP, BASS_BFX_COMPRESSOR2, BASS_BFX_CHORUS, BASS_BFX_AUTOWAH, BASS_BFX_BQF, BASS_BFX_MIX, BASS_BFX_VOLUME_ENV.

Use BASS_ChannelSetFX(Int32, BASSFXType, Int32) to add an effect DSP to a channel at anay time and BASS_ChannelRemoveFX(Int32, Int32) to remove an effect from the channel.

ERROR CODEDescription
BASS_ERROR_HANDLEhandle is not valid.
BASS_ERROR_ILLPARAMOne or more of the parameters are invalid, make sure all the values are within the valid ranges.
BASS_ERROR_UNKNOWNSome other mystery problem!

Examples

int stream = Bass.BASS_StreamCreateFile("test.mp3", 0, 0, BASSFlag.BASS_DEFAULT);
BASS_DX8_ECHO echo = new BASS_DX8_ECHO();
// add the effect to the DSP chain
int fxHandle = Bass.BASS_ChannelSetFX(stream, BASSFXType.BASS_FX_ECHO, 0);
echo.Preset_Long();
// apply the effect parameters
Bass.BASS_FXSetParameters(fxHandle, echo);
// play the channel
Bass.BASS_ChannelPlay(stream, false);
See Also

Reference