BASS

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

Increasing the buffer length decreases the chance of the stream stalling, but also increases the time taken to create the stream as more data has to be pre-buffered (adjustable via the BASS_CONFIG_NET_PREBUF config option). Aside from the pre-buffering, this setting has no effect on streams without either the BASS_STREAM_BLOCK or BASS_STREAM_RESTRATE flags.

When streaming in blocks, this option determines the download buffer length. 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.

This config option also determines the buffering used by "buffered" user file streams created with BASS_StreamCreateFileUser.

The default buffer length is 5 seconds (5000 milliseconds). The net buffer length should be larger than the length of the playback buffer (BASS_CONFIG_BUFFER), otherwise the stream is likely to stall soon after starting playback.

Using this config option only affects streams created afterwards, not any that have already been created.

See also

BASS_GetConfig, BASS_SetConfig, BASS_StreamCreateFileUser, BASS_StreamCreateURL, BASS_CONFIG_BUFFER, BASS_CONFIG_NET_PREBUF, BASS_CONFIG_NET_TIMEOUT