The playback buffering length.
BASS_ChannelSetAttribute( DWORD handle, BASS_ATTRIB_BUFFER, float buffer );
handle | The channel handle... a HMUSIC or HSTREAM. |
buffer | The buffering length in seconds... 0 = no buffering. This is automatically capped to the full length of the channel's playback buffer. |
When this attribute is set to 0, no data will be buffered and the channel will only be asked to produce data as it is needed during the generation of the final mix. This allows the lowest latency to be achieved, but also imposes tighter timing requirements on the channel to produce its data and apply any DSP/FX (and run mixtime syncs) that are set on it; if too long is taken, there will be a break in the output, affecting all channels that are playing on the same device. The channel's data is still placed in its playback buffer, which allows BASS_ChannelGetData and BASS_ChannelGetLevel to be used, although there is likely to be less data available to them due to the buffer being less full.
This attribute can be changed mid-playback. Any excess data that is currently in the playback buffer will still be played but not replaced. Low (but not 0) settings may require the BASS_CONFIG_UPDATEPERIOD setting to be lowered too.
The default value is the channel's full playback buffer length, as determined by the BASS_CONFIG_BUFFER setting at the time of its creation.