CDROM Audio

How Many Drives?

If you want to access an audio CD from your program, you need to use the "SDL_INIT_CDROM" flag when calling SDL_Init().

The first thing to do is to find out how many CDROM drives there are. (Mainly, we want to see if there's one at all.) You do this by calling "SDL_CDNumDrives()":

if (SDL_CDNumDrives() > 0)
  ...