Browse Source

libtunes: change variable name

This make the variable purpose more clear.
sbg
Simone Guscetti 8 years ago committed by Daniel Agar
parent
commit
9cb95b64ca
  1. 6
      src/lib/tunes/tunes.cpp
  2. 2
      src/lib/tunes/tunes.h

6
src/lib/tunes/tunes.cpp

@ -74,7 +74,7 @@ void Tunes::config_tone(bool repeat_flag) @@ -74,7 +74,7 @@ void Tunes::config_tone(bool repeat_flag)
_next = nullptr;
} else {
_tune = _start_tune;
_tune = _tune_start_ptr;
_next = _tune;
}
@ -120,7 +120,7 @@ int Tunes::set_control(const tune_control_s &tune_control) @@ -120,7 +120,7 @@ int Tunes::set_control(const tune_control_s &tune_control)
// TODO: come up with a better strategy
if (_tune == nullptr || reset_playing_tune || tune_control.tune_override) {
_tune = _default_tunes[tune_control.tune_id];
_start_tune = _default_tunes[tune_control.tune_id];
_tune_start_ptr = _default_tunes[tune_control.tune_id];
_next = _tune;
}
@ -140,7 +140,7 @@ void Tunes::set_string(const char *string) @@ -140,7 +140,7 @@ void Tunes::set_string(const char *string)
// set tune string the first time
if (_tune == nullptr) {
_tune = string;
_start_tune = string;
_tune_start_ptr = string;
_next = _tune;
}
}

2
src/lib/tunes/tunes.h

@ -101,7 +101,7 @@ private: @@ -101,7 +101,7 @@ private:
const char *_tune = nullptr; ///< current tune string
const char *_next = nullptr; ///< next note in the string
const char *_start_tune = nullptr; ///< pointer to repeat tune
const char *_tune_start_ptr = nullptr; ///< pointer to repeat tune
unsigned _tempo;
unsigned _note_length;

Loading…
Cancel
Save