BASS_CONFIG_DEV_PERIOD config option
The output device update period.
BASS_SetConfig(
BASS_CONFIG_DEV_PERIOD,
int period
);
Parameters
period | The update period in milliseconds, or in samples if negative.
|
Remarks
The device update period determines how often data is generated and placed in an output device's buffer. A shorter period allows a smaller buffer and lower latency but may use more CPU than a longer period.
The system may choose to use a different period if the requested one is too short or long, or needs rounding for granularity. The period actually being used can be obtained with BASS_GetInfo (the minbuf value).
The default setting is 10ms. Changes only affect subsequently initialized devices, not any that are already initialized.
Platform-specific
On Windows, this config option only applies pre-Vista and to the "No Sound" device, the period is otherwise set by Windows (usually 10ms). On iOS, except on the "No Sound" device, negative (samples) settings are ignored and changes take immediate effect rather than being delayed until the next device initialization
Example
Request an update period of 15ms.
BASS_SetConfig(BASS_CONFIG_DEV_PERIOD, 15);
Request an update period of 512 samples.
BASS_SetConfig(BASS_CONFIG_DEV_PERIOD, -512);
See also
BASS_GetConfig, BASS_GetInfo, BASS_Init, BASS_SetConfig, BASS_CONFIG_DEV_BUFFER