Blob Blame History Raw
--- src/alsaplay.c.orig	2011-05-02 21:22:30.000000000 -0600
+++ src/alsaplay.c	2015-10-03 10:33:52.961671169 -0600
@@ -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);