Add key to manually restart audio

This commit is contained in:
Lorenzooone
2024-05-11 05:21:17 +02:00
parent b48ec6cf17
commit 8c526e3747
5 changed files with 27 additions and 1 deletions

View File

@@ -3,6 +3,7 @@
void AudioData::reset() {
this->volume = 50;
this->mute = false;
this->restart_request = false;
this->text_updated = false;
}
@@ -23,9 +24,21 @@ void AudioData::change_audio_mute() {
this->text_updated = true;
}
void AudioData::request_audio_restart() {
this->restart_request = true;
}
bool AudioData::check_audio_restart_request() {
bool retval = this->restart_request;
if(retval)
this->restart_request = false;
return retval;
}
bool AudioData::has_text_to_print() {
bool retval = this->text_updated;
this->text_updated = false;
if(retval)
this->text_updated = false;
return retval;
}