Fix faulty PCM playback logic.

This commit is contained in:
Zachary Hall 2024-10-16 09:56:06 -07:00
parent b793fa949f
commit 63391a3be6

View file

@ -85,7 +85,7 @@ class ZsmBackend : public PlaybackBackend {
}
void audio_step(size_t samples) {
if (samples == 0) return;
while (pcm_fifo_avail() < samples) {
while (remain != 0 && pcm_fifo_avail() < samples) {
if (pcm_read_rate() == 0) break;
if ((--remain) == 0) {
if (islooped) {