Retrieves the playback position of a sample, stream, MOD music, or CD channel.
DWORD WINAPI BASS_ChannelGetPosition( |
Parameters
handle | The channel handle... a HCHANNEL, HMUSIC, HSTREAM, or CDCHANNEL. |
Return value
If an error occurs, 0xFFFFFFFF is returned, use BASS_ErrorGetCode to get the error code. If successful, the position is returned as follows.
HCHANNEL | Position in bytes. |
HMUSIC | LOWORD = order, HIWORD = row * scaler (see BASS_MusicSetPositionScaler). |
HSTREAM | Total number of bytes played since the stream was last flushed. In the case of a file stream, it will be the playback position of the stream (the position will change if you use BASS_ChannelSetPosition). |
CDCHANNEL | Position in milliseconds from the start of the track. |
Error codes
BASS_ERROR_HANDLE | handle is not a valid channel. |
BASS_ERROR_CDINIT | BASS_CDInit has not been successfully called. |
See also
BASS_ChannelGetLevel, BASS_ChannelIsActive, BASS_ChannelSetPosition