BASS_ATTRIB_VOL attribute

The volume level of a channel.

BASS_ChannelSetAttribute(
    DWORD handle,
    BASS_ATTRIB_VOL,
    float volume
);

Parameters

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

Remarks

This attribute is applied during playback of the channel and is not present in the sample data returned by BASS_ChannelGetData, so it has no direct effect on decoding channels. The BASS_ATTRIB_VOLDSP attribute can be used instead to change the level of a channel's sample data, or the BASS_FX_VOLUME effect via BASS_ChannelSetFX.

When using BASS_ChannelSlideAttribute to slide this attribute, a negative volume value can be used to fade-out and then stop the channel. When the linear volume curve is in use, the BASS_SLIDE_LOG flag can also be used to make a slide logarithmic rather than linear.

See also

BASS_ChannelGetAttribute, BASS_ChannelSetAttribute, BASS_ChannelSlideAttribute, BASS_ATTRIB_VOLDSP, BASS_CONFIG_CURVE_VOL