From: Abramo Bagnara Date: Sun, 11 Jun 2000 13:33:16 +0000 (+0000) Subject: Fixed oversized silence filling X-Git-Tag: v1.0.3~355 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=217417698c3391284b03b8c5460214de595ffee7;p=alsa-utils.git Fixed oversized silence filling --- 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) {