Mercurial > sdl-ios-xcode
comparison src/audio/ums/SDL_umsaudio.c @ 2735:204be4fc2726
Final merge of Google Summer of Code 2008 work...
Port SDL 1.3 to the Nintendo DS
by Darren Alton, mentored by Sam Lantinga
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 27 Aug 2008 15:10:03 +0000 |
parents | 5f6550e5184f |
children | 99210400e8b9 |
comparison
equal
deleted
inserted
replaced
2734:dd25eabe441c | 2735:204be4fc2726 |
---|---|
216 #ifdef DEBUG_AUDIO | 216 #ifdef DEBUG_AUDIO |
217 fprintf(stderr, "Returning from PlayAudio with devices error\n"); | 217 fprintf(stderr, "Returning from PlayAudio with devices error\n"); |
218 #endif | 218 #endif |
219 return; | 219 return; |
220 } | 220 } |
221 } | 221 } while (samplesToWrite > 0); |
222 while (samplesToWrite > 0); | |
223 | 222 |
224 SDL_LockAudio(); | 223 SDL_LockAudio(); |
225 SDL_memcpy(&swpbuf, &this->hidden->playbuf, sizeof(UMSAudioTypes_Buffer)); | 224 SDL_memcpy(&swpbuf, &this->hidden->playbuf, sizeof(UMSAudioTypes_Buffer)); |
226 SDL_memcpy(&this->hidden->playbuf, &this->hidden->fillbuf, | 225 SDL_memcpy(&this->hidden->playbuf, &this->hidden->fillbuf, |
227 sizeof(UMSAudioTypes_Buffer)); | 226 sizeof(UMSAudioTypes_Buffer)); |
324 break; | 323 break; |
325 } | 324 } |
326 if (!success) { | 325 if (!success) { |
327 test_format = SDL_NextAudioFormat(); | 326 test_format = SDL_NextAudioFormat(); |
328 } | 327 } |
329 } | 328 } while (!success && test_format); |
330 while (!success && test_format); | |
331 | 329 |
332 if (success == 0) { | 330 if (success == 0) { |
333 SDL_SetError("Couldn't find any hardware audio formats"); | 331 SDL_SetError("Couldn't find any hardware audio formats"); |
334 return -1; | 332 return -1; |
335 } | 333 } |