The output device buffer length.
BASS_SetConfig( BASS_CONFIG_DEV_BUFFER, DWORD length );
length | The buffer length in milliseconds. |
The buffer length needs to be a multiple of, and at least double, the device's update period, which can be set via the BASS_CONFIG_DEV_PERIOD option. The buffer length will be rounded up automatically if necessary to achieve that. The system may also choose to use a different buffer length if the requested one is too short or long, or needs rounding for granularity.
Changes to this config setting only affect subsequently initialized devices, not any that are already initialized. The "No Sound" device does not have a buffer, so is unaffected by this option.
On Linux, BASS will attempt to set the device buffer-feeding thread to real-time priority (as on other platforms) to reduce the chances of it getting starved of CPU, but if that is not possible (eg. the user account lacks permission) then it may be necessary to increase the buffer length to avoid breaks in the output when the CPU is busy.
When using AudioTrack output on Android, the buffer length will be automatically raised to the minimum given by the AudioTrack getMinBufferSize method if necessary.