From 217417698c3391284b03b8c5460214de595ffee7 Mon Sep 17 00:00:00 2001 From: Abramo Bagnara Date: Sun, 11 Jun 2000 13:33:16 +0000 Subject: [PATCH] Fixed oversized silence filling --- aplay/aplay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aplay/aplay.c b/aplay/aplay.c index 2853e83..aaf5542 100644 --- a/aplay/aplay.c +++ b/aplay/aplay.c @@ -737,8 +737,8 @@ static ssize_t pcm_write(u_char *data, size_t count) ssize_t result = 0; if (mode == SND_PCM_MODE_FRAGMENT && - count != buffer_size) { - snd_pcm_format_set_silence(format.format, data + count * bits_per_frame / 8, buffer_size * format.channels); + count < buffer_size) { + snd_pcm_format_set_silence(format.format, data + count * bits_per_frame / 8, (buffer_size - count) * format.channels); count = buffer_size; } while (count > 0) {