BASS_ATTRIB_MUSIC_VOL_CHAN attribute
The volume level of a channel in a MOD music.
BASS_ChannelSetAttribute( HMUSIC handle, BASS_ATTRIB_MUSIC_VOL_CHAN + channel, float volume );
Parameters
handle | The MOD music handle. |
channel | The channel to set the volume of... 0 = 1st channel. |
volume | The volume level... 0 (silent) to 1 (full). |
Remarks
The volume curve used by this attribute is always linear, eg. 0.5 = 50%. The BASS_CONFIG_CURVE_VOL config option setting has no effect on this. The volume level of all channels is initially 1 (full).During playback, the effect of changes to this attribute are not heard instantaneously, due to buffering. To reduce the delay, use the BASS_CONFIG_BUFFER config option to reduce the buffer length.
This attribute can also be used to count the number of channels in a MOD Music.
Example
Count the number of channels in a MOD music.int channels=0; float dummy; while (BASS_ChannelGetAttribute(music, BASS_ATTRIB_MUSIC_VOL_CHAN+channels, &dummy;)) channels++;