From 73a1821aba9d41c70a05d59fbb11bfbf0316c866 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Mon, 10 Jan 2022 23:27:02 +0100 Subject: [PATCH] Flush MOD output after normal end of playback (#482) small oops in my previous PR - output->flush was not called after normal "end of song". --- src/AudioGeneratorMOD.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AudioGeneratorMOD.cpp b/src/AudioGeneratorMOD.cpp index 6a3a07c..cb828b2 100644 --- a/src/AudioGeneratorMOD.cpp +++ b/src/AudioGeneratorMOD.cpp @@ -70,7 +70,7 @@ bool AudioGeneratorMOD::stop() FatBuffer.channels[i] = NULL; } - if(running && (file != NULL) && (file->isOpen() == true)) { + if(running || ((file != NULL) && (file->isOpen() == true))) { output->flush(); //flush I2S output buffer, if the player was actually running before. }