BASS.NET API for the Un4seen BASS Audio Library

BassCdBASS_CD_Analog_Play Method (Int32, Int32, Double)

BASS.NET API for the Un4seen BASS Audio Library
Starts analog playback of an audio CD track.

Namespace:  Un4seen.Bass.AddOn.Cd
Assembly:  Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax

public static bool BASS_CD_Analog_Play(
	int drive,
	int track,
	double seconds
)

Parameters

drive
Type: SystemInt32
The drive... 0 = the first drive.
track
Type: SystemInt32
The track... 0 = the first track.
seconds
Type: SystemDouble
Position (in seconds) to start playback from (this will automatically be converted to frames internally).

Return Value

Type: Boolean
If successful, is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
Remarks

Some old CD drives may not be able to digitally extract audio data (or not quickly enough to sustain playback), so that it's not possible to use BASS_CD_StreamCreate(Int32, Int32, BASSFlag) 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 it's 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(Int32).

ERROR CODEDescription
BASS_ERROR_DEVICEdrive is not valid.
BASS_ERROR_NOCDThere's no CD in the drive.
BASS_ERROR_CDTRACKtrack is invalid.
BASS_ERROR_NOTAUDIOThe track is not an audio track.
BASS_ERROR_POSITIONseconds is invalid.
BASS_ERROR_UNKNOWNSome other mystery problem!

Examples

Play track 3 on drive 0, starting at the 10 second point:
bool ok = BassCd.BASS_CD_Analog_Play(0, 3, 10.0);
See Also

Reference