Retrieves the playback position of a mixer source channel, optionally accounting for some latency.
|handle||The channel handle.
|mode||How to retrieve the position. One of the following.
other modes may be supported by add-ons, see the documentation.
|BASS_POS_BYTE||Get the position in bytes.
|BASS_POS_MUSIC_ORDER||Get the position in orders and rows... LOWORD = order, HIWORD = row * scaler (BASS_ATTRIB_MUSIC_PSCALER). (HMUSIC only)
|delay||How far back (in bytes) in the mixer output to get the source channel's position from.
If successful, then the channel's position is returned, else -1 is returned. Use BASS_ErrorGetCode to get the error code.
|BASS_ERROR_HANDLE||handle is not plugged into a mixer.
|BASS_ERROR_NOTAVAIL||The requested position mode is not available, or delay goes beyond where the mixer has record of the source channel's position.
|BASS_ERROR_UNKNOWN||Some other mystery problem!
BASS_Mixer_ChannelGetPosition compensates for the mixer's playback buffering to give the position that is currently being heard, but if the mixer is feeding some other output system, it will not know how to compensate for that. This function fills that gap by allowing the latency to be specified in the call. This functionality requires the mixer to keep a record of its sources' position going back some time, and that is enabled via the BASS_MIXER_POSEX flag when a mixer is created, with the BASS_CONFIG_MIXER_POSEX config option determining how far back the position record goes. If the mixer is not a decoding channel (not using the BASS_STREAM_DECODE flag), then it will automatically have a position record at least equal to its playback buffer length.