Mercurial > sdl-ios-xcode
comparison include/SDL_cdrom.h @ 337:9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 11 Apr 2002 14:35:16 +0000 |
parents | f6ffac90895c |
children | b8d311d90021 |
comparison
equal
deleted
inserted
replaced
336:745873ea091f | 337:9154ec9ca3d2 |
---|---|
97 /* CD-audio API functions: */ | 97 /* CD-audio API functions: */ |
98 | 98 |
99 /* Returns the number of CD-ROM drives on the system, or -1 if | 99 /* Returns the number of CD-ROM drives on the system, or -1 if |
100 SDL_Init() has not been called with the SDL_INIT_CDROM flag. | 100 SDL_Init() has not been called with the SDL_INIT_CDROM flag. |
101 */ | 101 */ |
102 extern DECLSPEC int SDL_CDNumDrives(void); | 102 extern DECLSPEC int SDLCALL SDL_CDNumDrives(void); |
103 | 103 |
104 /* Returns a human-readable, system-dependent identifier for the CD-ROM. | 104 /* Returns a human-readable, system-dependent identifier for the CD-ROM. |
105 Example: | 105 Example: |
106 "/dev/cdrom" | 106 "/dev/cdrom" |
107 "E:" | 107 "E:" |
108 "/dev/disk/ide/1/master" | 108 "/dev/disk/ide/1/master" |
109 */ | 109 */ |
110 extern DECLSPEC const char * SDL_CDName(int drive); | 110 extern DECLSPEC const char * SDLCALL SDL_CDName(int drive); |
111 | 111 |
112 /* Opens a CD-ROM drive for access. It returns a drive handle on success, | 112 /* Opens a CD-ROM drive for access. It returns a drive handle on success, |
113 or NULL if the drive was invalid or busy. This newly opened CD-ROM | 113 or NULL if the drive was invalid or busy. This newly opened CD-ROM |
114 becomes the default CD used when other CD functions are passed a NULL | 114 becomes the default CD used when other CD functions are passed a NULL |
115 CD-ROM handle. | 115 CD-ROM handle. |
116 Drives are numbered starting with 0. Drive 0 is the system default CD-ROM. | 116 Drives are numbered starting with 0. Drive 0 is the system default CD-ROM. |
117 */ | 117 */ |
118 extern DECLSPEC SDL_CD * SDL_CDOpen(int drive); | 118 extern DECLSPEC SDL_CD * SDLCALL SDL_CDOpen(int drive); |
119 | 119 |
120 /* This function returns the current status of the given drive. | 120 /* This function returns the current status of the given drive. |
121 If the drive has a CD in it, the table of contents of the CD and current | 121 If the drive has a CD in it, the table of contents of the CD and current |
122 play position of the CD will be stored in the SDL_CD structure. | 122 play position of the CD will be stored in the SDL_CD structure. |
123 */ | 123 */ |
124 extern DECLSPEC CDstatus SDL_CDStatus(SDL_CD *cdrom); | 124 extern DECLSPEC CDstatus SDLCALL SDL_CDStatus(SDL_CD *cdrom); |
125 | 125 |
126 /* Play the given CD starting at 'start_track' and 'start_frame' for 'ntracks' | 126 /* Play the given CD starting at 'start_track' and 'start_frame' for 'ntracks' |
127 tracks and 'nframes' frames. If both 'ntrack' and 'nframe' are 0, play | 127 tracks and 'nframes' frames. If both 'ntrack' and 'nframe' are 0, play |
128 until the end of the CD. This function will skip data tracks. | 128 until the end of the CD. This function will skip data tracks. |
129 This function should only be called after calling SDL_CDStatus() to | 129 This function should only be called after calling SDL_CDStatus() to |
140 if ( CD_INDRIVE(SDL_CDStatus(cdrom)) ) | 140 if ( CD_INDRIVE(SDL_CDStatus(cdrom)) ) |
141 SDL_CDPlayTracks(cdrom, 0, 0, 2, 10); | 141 SDL_CDPlayTracks(cdrom, 0, 0, 2, 10); |
142 | 142 |
143 This function returns 0, or -1 if there was an error. | 143 This function returns 0, or -1 if there was an error. |
144 */ | 144 */ |
145 extern DECLSPEC int SDL_CDPlayTracks(SDL_CD *cdrom, | 145 extern DECLSPEC int SDLCALL SDL_CDPlayTracks(SDL_CD *cdrom, |
146 int start_track, int start_frame, int ntracks, int nframes); | 146 int start_track, int start_frame, int ntracks, int nframes); |
147 | 147 |
148 /* Play the given CD starting at 'start' frame for 'length' frames. | 148 /* Play the given CD starting at 'start' frame for 'length' frames. |
149 It returns 0, or -1 if there was an error. | 149 It returns 0, or -1 if there was an error. |
150 */ | 150 */ |
151 extern DECLSPEC int SDL_CDPlay(SDL_CD *cdrom, int start, int length); | 151 extern DECLSPEC int SDLCALL SDL_CDPlay(SDL_CD *cdrom, int start, int length); |
152 | 152 |
153 /* Pause play -- returns 0, or -1 on error */ | 153 /* Pause play -- returns 0, or -1 on error */ |
154 extern DECLSPEC int SDL_CDPause(SDL_CD *cdrom); | 154 extern DECLSPEC int SDLCALL SDL_CDPause(SDL_CD *cdrom); |
155 | 155 |
156 /* Resume play -- returns 0, or -1 on error */ | 156 /* Resume play -- returns 0, or -1 on error */ |
157 extern DECLSPEC int SDL_CDResume(SDL_CD *cdrom); | 157 extern DECLSPEC int SDLCALL SDL_CDResume(SDL_CD *cdrom); |
158 | 158 |
159 /* Stop play -- returns 0, or -1 on error */ | 159 /* Stop play -- returns 0, or -1 on error */ |
160 extern DECLSPEC int SDL_CDStop(SDL_CD *cdrom); | 160 extern DECLSPEC int SDLCALL SDL_CDStop(SDL_CD *cdrom); |
161 | 161 |
162 /* Eject CD-ROM -- returns 0, or -1 on error */ | 162 /* Eject CD-ROM -- returns 0, or -1 on error */ |
163 extern DECLSPEC int SDL_CDEject(SDL_CD *cdrom); | 163 extern DECLSPEC int SDLCALL SDL_CDEject(SDL_CD *cdrom); |
164 | 164 |
165 /* Closes the handle for the CD-ROM drive */ | 165 /* Closes the handle for the CD-ROM drive */ |
166 extern DECLSPEC void SDL_CDClose(SDL_CD *cdrom); | 166 extern DECLSPEC void SDLCALL SDL_CDClose(SDL_CD *cdrom); |
167 | 167 |
168 | 168 |
169 /* Ends C function definitions when using C++ */ | 169 /* Ends C function definitions when using C++ */ |
170 #ifdef __cplusplus | 170 #ifdef __cplusplus |
171 } | 171 } |