BASS_CONFIG_NET_PREBUF config option

Amount to pre-buffer before playing internet streams.

BASS_SetConfig(
    BASS_CONFIG_NET_PREBUF,
    DWORD prebuf
);

Parameters

prebufAmount (percentage) to pre-buffer.

Remarks

This setting determines what percentage of the download buffer length (BASS_CONFIG_NET_BUFFER) should be filled before starting playback. The default is 75%. This setting is just a minimum; BASS will always pre-download a certain amount to detect the stream's format and initialize the decoder.

Pre-buffering is performed asynchronously and does not hold up stream creation. Its progress can be monitored with BASS_StreamGetFilePosition (BASS_FILEPOS_BUFFERING). If BASS_ChannelStart or BASS_ChannelPlay is called before pre-buffering is complete then the playback will begin in a stalled state, and will resume when the pre-buffering is complete.

This setting also determines a stream's initial BASS_ATTRIB_NET_RESUME value, the amount needed to resume a stalled stream. As well as internet streams, this config setting also applies to "buffered" user file streams created with BASS_StreamCreateFileUser.

See also

BASS_GetConfig, BASS_SetConfig, BASS_StreamCreateURL, BASS_CONFIG_NET_BUFFER