BASS_ATTRIB_NOBUFFER attribute


Disable playback buffering?

BASS_ChannelSetAttribute(
    DWORD handle,
    BASS_ATTRIB_NOBUFFER,
    float nobuffer
);

Parameters

handleThe channel handle... a HMUSIC or HSTREAM.
nobufferDisable playback buffering... 0 = no, else yes.

Remarks

A playing channel is normally asked to render data to its playback buffer in advance, via automatic buffer updates or the BASS_Update function, ready for mixing with other channels to produce the final mix that is given to the output device. When this attribute is switched on (the default is off), that buffering is skipped 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 when this attribute is on, 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. If switched on, any already buffered data will still be played, so that there is no break in sound. Similarly, BASS_ChannelUpdate can still be used to add data to the buffer when playback buffering is disabled.

Platform-specific

This attribute is not available on Windows, as BASS does not generate the final mix.

See also

BASS_ChannelGetAttribute, BASS_ChannelSetAttribute