Starts analog playback of an audio CD track.

BOOL BASS_CD_Analog_Play(
    DWORD drive,
    DWORD track,
    DWORD pos


driveThe drive... 0 = the first drive.
trackThe track... 0 = the first track.
posPosition in frames to start playback from. There are 75 frames per second.

Return value

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

Error codes

BASS_ERROR_DEVICEdrive is invalid.
BASS_ERROR_NOCDThere is no CD in the drive.
BASS_ERROR_CDTRACKtrack is invalid.
BASS_ERROR_NOTAUDIOThe track is not an audio track.
BASS_ERROR_POSITIONpos is invalid.
BASS_ERROR_UNKNOWNSome other mystery problem!


Some old CD drives may not be able to digitally extract audio data (or not quickly enough to sustain playback), so that it is not possible to use BASS_CD_StreamCreate to stream CD tracks. This is where the analog playback option can come in handy.

In analog playback, the sound bypasses BASS; it goes directly from the CD drive to the soundcard (assuming the drive is cabled up to the soundcard). This means that BASS output does not need to be initialized to use analog playback. It also means that it is not possible to apply any DSP/FX to the sound, and nor is it possible to visualise it (unless you record the sound from the soundcard).

Analog playback is not possible while digital streaming is in progress; the streaming will kill the analog playback. So if you wish to switch from digital to analog playback, you should first free the stream using BASS_StreamFree.


Play track 3 on drive 0, starting at the 10 second point.
BASS_CD_Analog_Play(0, 3, 10 * 75);

See also

BASS_CD_Analog_GetPosition, BASS_CD_Analog_IsActive, BASS_CD_Analog_Stop, BASS_CD_GetTracks, BASS_CD_StreamCreate