CDaudio function parameters

Started by left, Thu 07/04/2005 19:51:56

Previous topic - Next topic

left

hi, ii am trying to use the cd audio(querie)  function, the command which checks for a cd in the drive which is supposed to return a value of either 1 or 0 depending on whether there is a cd in the drive or not

if have used the following code but it does not work, i gues the code i have written is wrong. How do i write it properly

CDAudio (0, 0);

if (CDAudio(0,0) == 0) {//do something
}

thanks

Pumaman

Passing the parameter as 0 checks whether there is a CD-ROM drive, not whether a CD is actually in the drive or not.

Consequently, I'd expect it to return 1.

To check whether a CD is in the drive, use the Get Number Of Tracks feature (parameter 5):

if (CDAudio(5,0) == 0) {
  Display("No CD in the drive");
}

SMF spam blocked by CleanTalk