2 * $Source: /cvs/cvsroot/d2x/arch/sdl/cdrom.c,v $
5 * $Date: 2001-10-25 08:25:34 $
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 $
11 * Revision 1.3 2001/01/29 13:53:28 bradleyb
12 * Fixed build, minor fixes
23 #include <SDL/SDL_cdrom.h>
29 static SDL_CD *s_cd = NULL;
30 extern int Redbook_playing;
31 static int initialised = 0;
43 if (initialised) return;
44 if (FindArg("-nocdrom")) return;
46 if (SDL_Init(SDL_INIT_CDROM) < 0)
48 Warning("SDL library initialisation failed: %s.",SDL_GetError());
52 if (SDL_CDNumDrives() == 0)
54 Warning("No cdrom drives found!\n");
72 int RBAPlayTrack(int a)
74 if (!initialised) return -1;
76 if (CD_INDRIVE(SDL_CDStatus(s_cd)) ) {
77 SDL_CDPlayTracks(s_cd, a-1, 0, 0, 0);
85 if (!initialised) return;
89 void RBASetVolume(int a)
96 if (!initialised) return;
102 if (!initialised) return;
106 int RBAGetNumberOfTracks()
108 if (!initialised) return -1;
110 return s_cd->numtracks;
113 int RBAPlayTracks(int tracknum,int something)
115 if (!initialised) return -1;
116 if (CD_INDRIVE(SDL_CDStatus(s_cd)) ) {
117 SDL_CDPlayTracks(s_cd, tracknum-1, 0, 0, 0);
124 if (!initialised) return -1;
126 return s_cd->cur_track;
129 int RBAPeekPlayStatus()