From 3a1625a1db9401b2055232965971d2b14f75fe63 Mon Sep 17 00:00:00 2001 From: Josh Goebel Date: Sat, 20 Feb 2016 19:50:12 -0500 Subject: [PATCH] move tune_played default (false) to var declaration - this way it's set even if begin() is not properly called --- src/audio/audio.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/audio/audio.cpp b/src/audio/audio.cpp index d873a54..750761f 100644 --- a/src/audio/audio.cpp +++ b/src/audio/audio.cpp @@ -9,7 +9,7 @@ volatile byte *_tunes_timer3_pin_port; volatile byte _tunes_timer3_pin_mask; byte _tune_pins[AVAILABLE_TIMERS]; byte _tune_num_chans = 0; -volatile boolean tune_playing; // is the score still playing? +volatile boolean tune_playing = false; // is the score still playing? volatile unsigned wait_timer_frequency2; /* its current frequency */ volatile boolean wait_timer_playing = false; /* is it currently playing a note? */ volatile boolean tonePlaying = false; @@ -72,7 +72,6 @@ void ArduboyAudio::saveOnOff() void ArduboyAudio::begin() { - tune_playing = false; if (EEPROM.read(EEPROM_AUDIO_ON_OFF)) on(); }