Skip to content
Snippets Groups Projects
Commit 92b89368 authored by Alessandro Simovic's avatar Alessandro Simovic Committed by Beat Küng
Browse files

libtunes: fixed playback of string melodies

parent 7d9b09b5
No related branches found
No related tags found
No related merge requests found
......@@ -131,14 +131,15 @@ int Tunes::set_control(const tune_control_s &tune_control)
return OK;
}
void Tunes::set_string(const char *const string)
void Tunes::set_string(const char *const string, uint8_t strength)
{
// Only play new tune if current tune is a repeated one nothing is being played
if (_repeat || _tune == nullptr) {
// Only play new tune if nothing is being played currently
if (_tune == nullptr) {
// set tune string the first time
_tune = string;
_tune_start_ptr = string;
_next = _tune;
_strength = strength;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment