From b8a1e95773227e2b4942d2f67cc10f7d133d75ad Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Tue, 19 Jan 2021 12:36:28 +0100 Subject: [PATCH] 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 --- aplay/aplay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);