Call output->stop() when stopping generators (#174)
* Fix hanging sound on WAV stop for ESP32 * Fix hanging sound on AAC stop for ESP32 * Fix hanging sound on MIDI stop for ESP32 * Fix hanging sound on MOD stop for ESP32 * Fix hanging sound on MP3a stop for ESP32 * Fix hanging sound on RTTTL stop for ESP32
This commit is contained in:
1 parent
814ec61fa7
commit
87fbcadd80
6 files changed
+6
-1
No files matched your search
@@ -126,7 +126,7 @@ bool AudioGeneratorFLAC::stop()
|
||||
FLAC__stream_decoder_delete(flac);
|
||||
flac = NULL;
|
||||
running = false;
|
||||
|
||||
output->stop();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -585,6 +585,7 @@ done:
|
||||
bool AudioGeneratorMIDI::stop()
|
||||
{
|
||||
StopMIDI();
|
||||
output->stop();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@ bool AudioGeneratorMOD::stop()
|
||||
}
|
||||
if (file) file->close();
|
||||
running = false;
|
||||
output->stop();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ bool AudioGeneratorMP3a::stop()
|
||||
{
|
||||
if (!running) return true;
|
||||
running = false;
|
||||
output->stop();
|
||||
return file->close();
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ bool AudioGeneratorRTTTL::stop()
|
||||
{
|
||||
if (!running) return true;
|
||||
running = false;
|
||||
output->stop();
|
||||
return file->close();
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ bool AudioGeneratorWAV::stop()
|
||||
running = false;
|
||||
free(buff);
|
||||
buff = NULL;
|
||||
output->stop();
|
||||
return file->close();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user