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".
This commit is contained in:
Frank authored and GitHub committed 2022-01-10 14:27:02 -08:00
1 parent d5dea4f20c
commit 73a1821aba
1 file changed
+1 -1
+1 -1
View File
@@ -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.
}