SHA256
1
0
forked from pool/xemacs
xemacs/xemacs-21.5.34-alsaplay.patch

14 lines
397 B
Diff

--- xemacs-21.5.34/src/alsaplay.c
+++ xemacs-21.5.34/src/alsaplay.c
@@ -375,6 +375,10 @@ alsa_play_sound_data (const Binbyte *dat
if ((err = snd_pcm_writei (pcm_handle, data, length)) < 0)
goto error_mixer;
+ /* Wait for it to finish */
+ if ((err = snd_pcm_drain (pcm_handle)) < 0)
+ goto error_mixer;
+
/* Put the volume back the way it used to be */
reset_volume (&mix);