The source channel buffer length.

    DWORD length


lengthThe buffer length... 1 to 5 is a multiplier of the BASS_CONFIG_BUFFER setting (at the time of the mixer's creation), otherwise it is an absolute length in milliseconds.


When a source channel has buffering enabled, the mixer will buffer the decoded data so that it is available to the BASS_Mixer_ChannelGetData and BASS_Mixer_ChannelGetLevel and BASS_Mixer_ChannelGetLevelEx functions. The source channel buffer length can be set as a multiple of the BASS_CONFIG_BUFFER setting (at the time of the mixer's creation) or as an absolute length. If it is set lower than the BASS_CONFIG_BUFFER setting and the mixer is not a decoding channel, then it will be automatically raised to match that.

Larger buffers obviously require more memory, so this should not be set higher than necessary. If a source is played at its default rate, then the buffer only needs to be as big as the mixer's playback buffer, but if it is played at a faster rate, then the buffer needs to be bigger for it to contain the data that is currently being heard from the mixer. For example, playing a channel at 2x its normal speed would require its buffer to be 2x the normal size.

The default setting is 2, for 2x the BASS_CONFIG_BUFFER setting. Changes only affect subsequently set up channel buffers. An existing channel can have its buffer reinitialized by removing and then resetting the BASS_MIXER_CHAN_BUFFER flag via BASS_Mixer_ChannelFlags.

See also

BASS_Mixer_ChannelFlags, BASS_Mixer_ChannelGetData, BASS_Mixer_ChannelGetLevel, BASS_Mixer_ChannelGetLevelEx, BASS_Mixer_StreamAddChannel

BASS_GetConfig, BASS_SetConfig