src/audio/alsa/SDL_alsa_audio.c
changeset 12201 8bdc4d340419
parent 12079 8ffd9de57415
child 12503 806492103856
equal deleted inserted replaced
12200:c0b17b32b95e 12201:8bdc4d340419
   443 
   443 
   444 static void
   444 static void
   445 ALSA_CloseDevice(_THIS)
   445 ALSA_CloseDevice(_THIS)
   446 {
   446 {
   447     if (this->hidden->pcm_handle) {
   447     if (this->hidden->pcm_handle) {
   448 	/* Wait for the submitted audio to drain
   448         /* Wait for the submitted audio to drain
   449            ALSA_snd_pcm_drop() can hang, so don't use that.
   449            ALSA_snd_pcm_drop() can hang, so don't use that.
   450          */
   450          */
   451         Uint32 delay = ((this->spec.samples * 1000) / this->spec.freq) * 2;
   451         Uint32 delay = ((this->spec.samples * 1000) / this->spec.freq) * 2;
   452         SDL_Delay(delay);
   452         SDL_Delay(delay);
   453 
   453