From: Jaroslav Kysela Date: Tue, 19 Jan 2021 11:36:28 +0000 (+0100) Subject: aplay: fix the test position test for playback (avail > delay) X-Git-Tag: v1.2.5~85 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=b8a1e95773227e2b4942d2f67cc10f7d133d75ad;p=alsa-utils.git aplay: fix the test position test for playback (avail > delay) The avail > delay condition is invalid only for capture, of course. Signed-off-by: Jaroslav Kysela --- diff --git a/aplay/aplay.c b/aplay/aplay.c index b75be6c..9c827f4 100644 --- a/aplay/aplay.c +++ b/aplay/aplay.c @@ -1985,11 +1985,11 @@ static void do_test_position(void) fprintf(stderr, _("Suspicious status buffer position (%li total): " "avail = %li, delay = %li, buffer = %li\n"), ++counter, (long)savail, (long)sdelay, (long)buffer_frames); - } else if (avail > delay) { + } else if (stream == SND_PCM_STREAM_CAPTURE && avail > delay) { fprintf(stderr, _("Suspicious buffer position avail > delay (%li total): " "avail = %li, delay = %li\n"), ++counter, (long)avail, (long)delay); - } else if (savail > sdelay) { + } else if (stream == SND_PCM_STREAM_CAPTURE && savail > sdelay) { fprintf(stderr, _("Suspicious status buffer position avail > delay (%li total): " "avail = %li, delay = %li\n"), ++counter, (long)savail, (long)sdelay);