alsaloop: fix loopcount condition

BugLink: https://github.com/alsa-project/alsa-utils/issues/185
Fixes: e61f35b ("alsaloop: try adapt avail_min for playback to avoid 100% CPU usage")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2023-02-27 13:35:17 +01:00
parent 55bafb7938
commit fd2e386b3e

View file

@ -1962,7 +1962,7 @@ int pcmjob_pollfds_handle(struct loopback *loop, struct pollfd *fds)
if (play->xrun_pending || loop->reinit)
break;
loopcount++;
} while ((ccount > 0 || pcount > 0) && loopcount > 10);
} while ((ccount > 0 || pcount > 0) && loopcount < 10);
if (play->xrun_pending || capt->xrun_pending) {
if ((err = xrun_sync(loop)) < 0)
return err;