BASS_CD_Analog_GetPosition

Retrieves the current position on a drive.

DWORD BASS_CD_Analog_GetPosition(
    DWORD drive
);

Parameters

driveThe drive... 0 = the first drive.

Return value

If an error occurs, -1 is returned, use BASS_ErrorGetCode to get the error code. If successful, the HIWORD contains the track number (0=first), and the LOWORD contains the offset in frames.

Error codes

BASS_ERROR_DEVICEdrive is invalid.
BASS_ERROR_UNKNOWNSome other mystery problem!

Example

Get the current position on drive 0, and display it.
DWORD pos = BASS_CD_Analog_GetPosition(0); // get the position
DWORD track = HIWORD(pos) + 1; // get track number
DWORD secs = LOWORD(pos) / 75; // get offset in seconds
printf("track = %d, pos = %d:%02d\n", track, secs / 60, secs % 60); // display it

See also

BASS_CD_Analog_IsActive