comparison playsound/playsound.c @ 236:034b2e56f405

Fixed some tabs.
author Ryan C. Gordon <icculus@icculus.org>
date Sat, 19 Jan 2002 23:27:42 +0000
parents d6b24586822a
children c54eae85f5f1
comparison
equal deleted inserted replaced
235:2b9131a7653c 236:034b2e56f405
508 { 508 {
509 SDL_Delay(10); 509 SDL_Delay(10);
510 } /* while */ 510 } /* while */
511 SDL_PauseAudio(1); 511 SDL_PauseAudio(1);
512 512
513 /* Sleep two buffers' worth of audio before closing, in order 513 /*
514 to allow the playback to finish. This isn't always enough; 514 * Sleep two buffers' worth of audio before closing, in order
515 perhaps SDL needs a way to explicitly wait for device drain? */ 515 * to allow the playback to finish. This isn't always enough;
516 delay = 2 * 1000 * sdl_desired.samples / sdl_desired.freq; 516 * perhaps SDL needs a way to explicitly wait for device drain?
517 SDL_Delay(delay); 517 */
518 delay = 2 * 1000 * sdl_desired.samples / sdl_desired.freq;
519 SDL_Delay(delay);
518 520
519 if (sample->flags & SOUND_SAMPLEFLAG_ERROR) 521 if (sample->flags & SOUND_SAMPLEFLAG_ERROR)
520 { 522 {
521 fprintf(stderr, "Error in decoding sound file!\n" 523 fprintf(stderr, "Error in decoding sound file!\n"
522 " reason: [%s].\n", Sound_GetError()); 524 " reason: [%s].\n", Sound_GetError());