BASS_ChannelGetPosition

Retrieves the playback position of a sample, stream, MOD music, or CD channel.

DWORD WINAPI BASS_ChannelGetPosition(
    DWORD handle
);

Parameters
handleThe 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.

HCHANNELPosition in bytes.
HMUSICLOWORD = order, HIWORD = row * scaler (see BASS_MusicSetPositionScaler).
HSTREAMTotal 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).
CDCHANNELPosition in milliseconds from the start of the track.

Error codes
BASS_ERROR_HANDLEhandle is not a valid channel.
BASS_ERROR_CDINIT BASS_CDInit has not been successfully called.

See also
BASS_ChannelGetLevel, BASS_ChannelIsActive, BASS_ChannelSetPosition