Retrieves the amount of buffered data available to a splitter stream, or the amount of data in a splitter source buffer.
Namespace: Un4seen.Bass.AddOn.Mix
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
[DllImportAttribute("bassmix")] public static int BASS_Split_StreamGetAvailable( int handle )
Parameters
- handle
- Type: SystemInt32
The splitter (as obtained by BASS_Split_StreamCreate(Int32, BASSFlag, Int32)) or the source channel handle.
Return Value
Type: Int32If successful, then the amount of buffered data (in bytes) is returned, else -1 is returned. Use BASS_ErrorGetCode to get the error code.
Remarks
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.
ERROR CODE | Description |
---|---|
BASS_ERROR_HANDLE | The handle is neither a splitter stream or source. |
Examples
// create a new splitter int newsplit = BassMix.BASS_Split_StreamCreate(source, ...); // get the amount of data an existing splitter has buffered int offset = BassMix.BASS_Split_StreamGetAvailable(oldsplit); // add the amount in its playback buffer offset += BASS_ChannelGetData(oldsplit, null, BASSData.BASS_DATA_AVAILABLE); // reset the new splitter to that far back in the source buffer BassMix.BASS_Split_StreamResetEx(newsplit, offset); // start playing it Bass.BASS_ChannelPlay(newsplit, false);
See Also