]> git.alsa-project.org Git - alsa-utils.git/commitdiff
speaker-test: Add missing draining at the end
authorTakashi Iwai <tiwai@suse.de>
Tue, 16 Sep 2014 14:36:44 +0000 (16:36 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 16 Sep 2014 14:36:44 +0000 (16:36 +0200)
Without the call of snd_pcm_drain() the pending data on the buffer
might be discarded, which results in the abort of playback sound in
the middle.  Let's fix it.

Reported-and-tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
speaker-test/speaker-test.c

index 61396f296c6594cd368d1981111bdfb0d3d7913f..362efa7ffc0d2d1591c836d0b1e81d0dc6e35d6d 100644 (file)
@@ -1307,6 +1307,7 @@ int main(int argc, char *argv[]) {
     }
   }
 
+  snd_pcm_drain(handle);
 
   free(frames);
 #ifdef CONFIG_SUPPORT_CHMAP