BASS.NET API for the Un4seen BASS Audio LibraryBassMixBASS_Mixer_ChannelGetPosition Method (Int32)BASS.NET API for the Un4seen BASS Audio Library
Retrieves the playback position in bytes of a mixer source channel.

Namespace: Un4seen.Bass.AddOn.Mix
Assembly: Bass.Net (in Bass.Net.dll) Version:

public static long BASS_Mixer_ChannelGetPosition(
	int handle


Type: SystemInt32
The mixer source channel handle (which was add via BASS_Mixer_StreamAddChannel(Int32, Int32, BASSFlag) or BASS_Mixer_StreamAddChannelEx(Int32, Int32, BASSFlag, Int64, Int64)) beforehand).

Return Value

Type: Int64
If an error occurs, -1 is returned, use BASS_ErrorGetCode to get the error code. If successful, the position is returned.

This function is like the standard BASS_ChannelGetPosition(Int32, BASSMode), but it compensates for the mixer's buffering to return the source channel position that is currently being heard. So when used with a decoding channel (eg. a mixer source channel), this method will return the current decoding position. But if the mixer output is being played, then there is a playback buffer involved. This function compensates for that, to return the position that is currently being heard. If the mixer itself is a decoding channel, then this function is identical to using BASS_ChannelGetPosition(Int32, BASSMode).

ERROR CODEDescription
BASS_ERROR_HANDLEhandle is not plugged into a mixer.
BASS_ERROR_NOTAVAILThe requested position is not available.
BASS_ERROR_UNKNOWNSome other mystery problem!

See Also