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 <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2021-01-19 12:36:28 +01:00
parent 19cc5daef4
commit b8a1e95773

View file

@ -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);