mirror of https://github.com/MLXXXp/Arduboy2.git
move tune_played default (false) to var declaration
- this way it's set even if begin() is not properly called
This commit is contained in:
parent
6ff1c13b22
commit
3a1625a1db
|
@ -9,7 +9,7 @@ volatile byte *_tunes_timer3_pin_port;
|
||||||
volatile byte _tunes_timer3_pin_mask;
|
volatile byte _tunes_timer3_pin_mask;
|
||||||
byte _tune_pins[AVAILABLE_TIMERS];
|
byte _tune_pins[AVAILABLE_TIMERS];
|
||||||
byte _tune_num_chans = 0;
|
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 unsigned wait_timer_frequency2; /* its current frequency */
|
||||||
volatile boolean wait_timer_playing = false; /* is it currently playing a note? */
|
volatile boolean wait_timer_playing = false; /* is it currently playing a note? */
|
||||||
volatile boolean tonePlaying = false;
|
volatile boolean tonePlaying = false;
|
||||||
|
@ -72,7 +72,6 @@ void ArduboyAudio::saveOnOff()
|
||||||
|
|
||||||
void ArduboyAudio::begin()
|
void ArduboyAudio::begin()
|
||||||
{
|
{
|
||||||
tune_playing = false;
|
|
||||||
if (EEPROM.read(EEPROM_AUDIO_ON_OFF))
|
if (EEPROM.read(EEPROM_AUDIO_ON_OFF))
|
||||||
on();
|
on();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue