BASS_ATTRIB_VOLDSP attribute

The volume level applied in the DSP chain of a channel.

BASS_ChannelSetAttribute(
    DWORD handle,
    BASS_ATTRIB_VOLDSP,
    float volume
);

Parameters

handleThe channel handle.
volumeThe volume level... 0 = silent, 1.0 = normal, above 1.0 = amplification.

Remarks

Unlike BASS_ATTRIB_VOL, this attribute does have direct effect on decoding/recording channels and is present in the sample data returned by BASS_ChannelGetData, because it is applied in the channel's DSP chain. By default, the effect is applied at the start of the DSP chain, so that it is present in the data received by all DSP/FX, but that can be changed via the BASS_ATTRIB_VOLDSP_PRIORITY attribute.

During playback, the effect of changes to this attribute are not heard instantaneously due to buffering. This latency can be reduced via the BASS_ATTRIB_BUFFER attribute, but it is generally better to use the BASS_ATTRIB_VOL attribute instead for playback volume control.

Multiple DSP volume controls and ramping/fading are possible with the BASS_FX_VOLUME effect via BASS_ChannelSetFX.

See also

BASS_ChannelGetAttribute, BASS_ChannelSetAttribute, BASS_ChannelSlideAttribute, BASS_ATTRIB_VOL, BASS_CONFIG_FLOATDSP