fix double DM sounds (#20811)

* fix double DM sounds

* debug script

* bool

* cleanup

* inf

Co-authored-by: Comma Device <device@comma.ai>
This commit is contained in:
Adeeb Shihadeh
2021-05-03 21:38:22 -07:00
committed by GitHub
parent 80eb9abc67
commit b9f9e2dfda
4 changed files with 18 additions and 15 deletions
+2 -3
View File
@@ -224,9 +224,8 @@ static void update_alert(UIState *s) {
if (s->sm->updated("controlsState")) {
auto alert_sound = scene.controls_state.getAlertSound();
if (scene.alert_type.compare(scene.controls_state.getAlertType()) != 0) {
if (alert_sound == AudibleAlert::NONE) {
s->sound->stop();
} else {
s->sound->stop();
if (alert_sound != AudibleAlert::NONE) {
s->sound->play(alert_sound);
}
}