2 //**************************************************************************
6 //**************************************************************************
8 // HEADER FILES ------------------------------------------------------------
12 #include <sys/ioctl.h>
14 #include <sys/types.h>
19 #include <linux/cdrom.h>
23 // MACROS ------------------------------------------------------------------
25 // #define MAX_AUDIO_TRACKS 25
27 // TYPES -------------------------------------------------------------------
29 // EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
31 // PUBLIC FUNCTION PROTOTYPES ----------------------------------------------
33 // PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
35 // EXTERNAL DATA DECLARATIONS ----------------------------------------------
37 // PUBLIC DATA DEFINITIONS -------------------------------------------------
41 // PRIVATE DATA DEFINITIONS ------------------------------------------------
43 //static int cd_FirstTrack;
44 //static int cd_LastTrack;
46 static int cdfile = -1;
47 //static char cd_dev[64] = "/dev/cdrom";
49 // CODE --------------------------------------------------------------------
51 static int I_CDGetDiskInfo(void)
55 //==========================================================================
59 // Initializes the CD audio system. Must be called before using any
60 // other I_CDMus functions.
62 // Returns: 0 (ok) or -1 (error, in cd_Error).
64 //==========================================================================
73 //==========================================================================
77 // Play an audio CD track.
79 // Returns: 0 (ok) or -1 (error, in cd_Error).
81 //==========================================================================
83 int I_CDMusPlay(int track)
88 //==========================================================================
92 // Stops the playing of an audio CD.
94 // Returns: 0 (ok) or -1 (error, in cd_Error).
96 //==========================================================================
103 //==========================================================================
107 // Resumes the playing of an audio CD.
109 // Returns: 0 (ok) or -1 (error, in cd_Error).
111 //==========================================================================
113 int I_CDMusResume(void)
118 //==========================================================================
122 // Sets the CD audio volume (0 - 255).
124 // Returns: 0 (ok) or -1 (error, in cd_Error).
126 //==========================================================================
128 int I_CDMusSetVolume(int volume)
133 //==========================================================================
137 // Returns: the number of the first track.
139 //==========================================================================
141 int I_CDMusFirstTrack(void)
146 //==========================================================================
150 // Returns: the number of the last track.
152 //==========================================================================
154 int I_CDMusLastTrack(void)
159 //==========================================================================
163 //==========================================================================
165 void I_CDMusShutdown(void)
167 if(cdfile) close(cdfile);
170 //==========================================================================
174 //==========================================================================
176 void I_CDMusUpdate(void)