Skip to content

Commit

Permalink
Fix RTTTL stop on ESP32 (#473)
Browse files Browse the repository at this point in the history
Fixes #327 
Fixes #471
  • Loading branch information
FedericoBusero authored Dec 27, 2021
1 parent 4971e5c commit fe7a1f7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/AudioGeneratorRTTTL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ AudioGeneratorRTTTL::~AudioGeneratorRTTTL()

bool AudioGeneratorRTTTL::stop()
{
if (!running) return true;
if (!file || !output)
{
return false;
}
running = false;
output->stop();
return file->close();
Expand Down

0 comments on commit fe7a1f7

Please sign in to comment.