BASS_Split_StreamGetAvailable

Retrieves the amount of buffered data available to a splitter stream, or the amount of data in a splitter source buffer.

DWORD BASS_Split_StreamGetAvailable(
    DWORD handle
);

Parameters

handleThe splitter or source handle.

Return value

If successful, then the amount of buffered data (in bytes) is returned, else -1 is returned. Use BASS_ErrorGetCode to get the error code.

Error codes

BASS_ERROR_HANDLEhandle is neither a splitter stream or source.

Remarks

When used on a splitter source, this function reports how much data is in the buffer that is shared by all of its splitter streams. When used on a splitter stream, this function reports how much data is ahead of it in the buffer, before it will receive any new data from the source. A splitter stream can be repositioned within the buffer via the BASS_Split_StreamResetEx function.

The amount of data that can be buffered is limited by the buffer size, which is determined by the BASS_CONFIG_SPLIT_BUFFER config option.

The returned buffered byte count is always based on the source's sample format, even with splitter streams that were created with a different channel count.

See also

BASS_Split_StreamResetEx, BASS_CONFIG_SPLIT_BUFFER