Did you know that SDL can control attached CD / DVD drives? You can query various information about them, open the drive, close the drive, and even play audio tracks.
SDL_Init(SDL_INIT_CDROM);

int NumDrives = SDL_CDNumDrives();

if(NumDrives <= 0) {
//No drives available
}

int Track = 1;
SDL_CD* CDDrive = SDL_CDOpen(0); //Open first Drive

if(CDDrive == NULL) {
//Bad drive
}

if(CD_INDRIVE(SDL_CDStatus(CDDrive))) {
    SDL_CDPlayTracks(CDDrive, Track, 0, Track+1, 0); //Play first track
}

while(SDL_CDStatus(CDDrive) == CD_PLAYING) {
    SDL_Delay(1000); //Wait
}

SDL_CDEject(CDDrive); //All done!
For more information on this visit the SDL docs here http://www.libsdl.org/docs/html/cdrom.html.