BASS_CONFIG_NET_BUFFER config option

The internet download buffer length.

BASS_SetConfig(
    BASS_CONFIG_NET_BUFFER,
    DWORD length
);

Parameters

lengthThe buffer length in milliseconds.

Remarks

When streaming in blocks (BASS_STREAM_BLOCK flag set), this config option determines the download buffer length. When the download rate is restricted (BASS_STREAM_RESTRATE flag set), it determines how much data needs to be buffered before the restriction applies. The effective buffer length can actually be a bit more than that specified, including data that has been read from the buffer by the decoder but not yet decoded.

Together with the BASS_CONFIG_NET_PREBUF config option, this config option also affects how much data is pre-buffered before playback begins.

The default setting is 5 seconds (5000 milliseconds). Changes only affect streams that are created afterwards, not any that already exist.

The BASS_CONFIG_THREAD flag can be used to make the setting specific to the current thread. When that is non-zero, it will override the global setting in the current thread.

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_StreamCreateFileUser, BASS_StreamCreateURL, BASS_CONFIG_BUFFER, BASS_CONFIG_NET_PREBUF, BASS_CONFIG_NET_TIMEOUT