BASS_CONFIG_UPDATEPERIOD config option

The update period of HSTREAM and HMUSIC channel playback buffers.

BASS_SetConfig(
    BASS_CONFIG_UPDATEPERIOD,
    DWORD period
);

Parameters

periodThe update period in milliseconds... 0 = disable automatic updating. The minimum period is 5ms, the maximum is 100ms. If the period specified is outside this range, it is automatically capped.

Remarks

The update period is the amount of time between updates of the playback buffers of HSTREAM/HMUSIC channels that are playing; no update cycles occur when nothing is playing. Shorter update periods allow smaller buffers to be set with the BASS_CONFIG_BUFFER config option, but as the rate of updates increases, so the overhead of setting up the updates becomes a greater part of the CPU usage. The update period only affects HSTREAM and HMUSIC channels; it does not affect samples. Nor does it have any effect on decoding channels, as they are not played.

BASS creates one or more threads (determined by BASS_CONFIG_UPDATETHREADS) specifically to perform the updating, except when automatic updating is disabled (period = 0), in which case BASS_Update or BASS_ChannelUpdate should be used instead. This allows BASS's CPU usage to be synchronized with your software's. For example, in a game loop you could call BASS_Update once per frame, to keep all the processing in sync so that the frame rate is as smooth as possible.

The update period can be altered at any time, including during playback. The default period is 100ms.

See also

BASS_ChannelUpdate, BASS_GetConfig, BASS_SetConfig, BASS_Update, BASS_CONFIG_BUFFER, BASS_CONFIG_UPDATETHREADS, BASS_ATTRIB_BUFFER