Hopefully fix loop remainder

This commit is contained in:
Zachary Hall 2024-10-15 15:34:55 -07:00
parent 7ee0551c05
commit 27dbe46ac7

View file

@ -87,11 +87,10 @@ class ZsmBackend : public PlaybackBackend {
if (samples == 0) return;
while (pcm_fifo_avail() < samples && remain > 0) {
if (pcm_read_rate() == 0) break;
remain--;
if (remain == 0) {
if ((--remain) == 0) {
if (islooped) {
cur = loop;
remain = loop_rem;
remain = loop_rem - 1;
} else {
break;
}