Mercurial > sdl-ios-xcode
comparison src/audio/macrom/SDL_romaudio.c @ 2054:d22372343744
Patched to compile.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sat, 28 Oct 2006 07:39:35 +0000 |
parents | 5f6550e5184f |
children | 866052b01ee5 |
comparison
equal
deleted
inserted
replaced
2053:716cf90f24a0 | 2054:d22372343744 |
---|---|
156 | 156 |
157 SndDoCommand(chan, &cmd, 0); | 157 SndDoCommand(chan, &cmd, 0); |
158 } | 158 } |
159 } | 159 } |
160 | 160 |
161 static void | |
162 SNDMGR_CloseDevice(_THIS) | |
163 { | |
164 running = 0; | |
165 | |
166 if (this->hidden != NULL) { | |
167 if (this->hidden->channel) { | |
168 SndDisposeChannel(this->hidden->channel, true); | |
169 this->hidden->channel = NULL; | |
170 } | |
171 | |
172 SDL_free(buffer[0]); | |
173 SDL_free(buffer[1]); | |
174 buffer[0] = buffer[1] = NULL; | |
175 | |
176 SDL_free(this->hidden); | |
177 this->hidden = NULL; | |
178 } | |
179 } | |
180 | |
161 static int | 181 static int |
162 SNDMGR_OpenDevice(_THIS, const char *devname, int iscapture) | 182 SNDMGR_OpenDevice(_THIS, const char *devname, int iscapture) |
163 { | 183 { |
164 SDL_AudioSpec *spec = &this->spec; | 184 SDL_AudioSpec *spec = &this->spec; |
165 SndChannelPtr channel = NULL; | 185 SndChannelPtr channel = NULL; |
269 } | 289 } |
270 | 290 |
271 return 1; | 291 return 1; |
272 } | 292 } |
273 | 293 |
274 static void | |
275 SNDMGR_CloseDevice(_THIS) | |
276 { | |
277 int i; | |
278 | |
279 running = 0; | |
280 | |
281 if (this->hidden->channel) { | |
282 SndDisposeChannel(this->hidden->channel, true); | |
283 this->hidden->channel = NULL; | |
284 } | |
285 | |
286 for (i = 0; i < 2; ++i) { | |
287 if (buffer[i]) { | |
288 SDL_free(buffer[i]); | |
289 buffer[i] = NULL; | |
290 } | |
291 } | |
292 SDL_free(this->hidden); | |
293 this->hidden = NULL; | |
294 } | |
295 | |
296 static int | 294 static int |
297 SNDMGR_Init(SDL_AudioDriverImpl *impl) | 295 SNDMGR_Init(SDL_AudioDriverImpl *impl) |
298 { | 296 { |
299 /* Set the function pointers */ | 297 /* Set the function pointers */ |
300 impl->OpenDevice = SNDMGR_OpenDevice; | 298 impl->OpenDevice = SNDMGR_OpenDevice; |