BASS_Mixer_ChannelGetPosition
Retrieves the playback position of a mixer source channel.
QWORD BASS_Mixer_ChannelGetPosition(
DWORD handle,
DWORD mode
);
Parameters
handle | The channel handle.
|
mode | How to retrieve the position. One of the following.
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)
|
other modes may be supported by add-ons, see the documentation.
|
Return value
If successful, then the channel's position is returned, else -1 is returned. Use
BASS_ErrorGetCode to get the error code.
Error codes
BASS_ERROR_HANDLE | handle is not plugged into a mixer.
|
BASS_ERROR_NOTAVAIL | The requested position is not available.
|
BASS_ERROR_UNKNOWN | Some other mystery problem!
|
Remarks
This function is like the standard
BASS_ChannelGetPosition, but it compensates for the mixer's playback buffering to return the position that is currently being heard. If the mixer is not being played by BASS, it is possible to account for any other output system latency with the
BASS_ATTRIB_MIXER_LATENCY option or the
BASS_Mixer_ChannelGetPositionEx function.
See also
BASS_Mixer_ChannelGetPositionEx,
BASS_Mixer_ChannelSetPosition,
BASS_Mixer_ChannelSetSync,
BASS_ATTRIB_MIXER_LATENCY
BASS_ChannelGetPosition