2 * $Source: /cvs/cvsroot/d2x/sound/sdl_cdrom.c,v $
5 * $Date: 2001-01-29 13:53:28 $
7 * DPH: This is the file where all the stub functions go.
8 * The aim is to have nothing in here, eventually
10 * $Log: not supported by cvs2svn $
20 #include <SDL/SDL_cdrom.h>
26 static SDL_CD *s_cd = NULL;
27 extern int Redbook_playing;
28 static int initialised = 0;
40 if (initialised) return;
41 if (FindArg("-nocdrom")) return;
43 if (SDL_Init(SDL_INIT_CDROM) < 0)
45 Warning("SDL library initialisation failed: %s.",SDL_GetError());
49 if (SDL_CDNumDrives() == 0)
51 Warning("No cdrom drives found!\n");
69 int RBAPlayTrack(int a)
71 if (!initialised) return -1;
73 if (CD_INDRIVE(SDL_CDStatus(s_cd)) ) {
74 SDL_CDPlayTracks(s_cd, a-1, 0, 0, 0);
82 if (!initialised) return;
86 void RBASetVolume(int a)
93 if (!initialised) return;
99 if (!initialised) return;
103 int RBAGetNumberOfTracks()
105 if (!initialised) return -1;
107 return s_cd->numtracks;
110 int RBAPlayTracks(int tracknum,int something)
112 if (!initialised) return -1;
113 if (CD_INDRIVE(SDL_CDStatus(s_cd)) ) {
114 SDL_CDPlayTracks(s_cd, tracknum-1, 0, 0, 0);
121 if (!initialised) return -1;
123 return s_cd->cur_track;
126 int RBAPeekPlayStatus()