diff --git a/backends/playback/zsm/zsm_backend.hpp b/backends/playback/zsm/zsm_backend.hpp index d8f0286..c5e6037 100644 --- a/backends/playback/zsm/zsm_backend.hpp +++ b/backends/playback/zsm/zsm_backend.hpp @@ -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) {