Changes the track of a CD stream.

BOOL BASS_CD_StreamSetTrack(
    HSTREAM handle,
    DWORD track


handleThe CD stream handle.
trackThe new track... 0 = the first track, BASS_CD_TRACK_PREGAP = 1st track pregap (not all drives support reading of the 1st track pregap).

Return value

If successful, TRUE is returned, else FALSE is returned. Use BASS_ErrorGetCode to get the error code.

Error codes

BASS_ERROR_HANDLEhandle is not valid.
BASS_ERROR_NOCDThere is no CD in the drive.
BASS_ERROR_CDTRACKtrack is invalid.
BASS_ERROR_NOTAUDIOThe track is not an audio track.


The stream's current position is set to the start of the new track.

This function is identical to using the BASS_POS_CD_TRACK "mode" with BASS_ChannelSetPosition. Either can be used with a BASS_SYNC_END sync (set via BASS_ChannelSetSync) to play one track after another.

See also

BASS_CD_StreamCreate, BASS_CD_StreamGetTrack