From 1e48b2458e2799bcfeded9e42996da605b66561f Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Thu, 19 Nov 2020 21:04:14 +0100 Subject: [PATCH] Qt ui: only stop repeat sounds (#2577) --- selfdrive/ui/qt/qt_sound.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/selfdrive/ui/qt/qt_sound.cc b/selfdrive/ui/qt/qt_sound.cc index 107e299d55..c18b2d5850 100644 --- a/selfdrive/ui/qt/qt_sound.cc +++ b/selfdrive/ui/qt/qt_sound.cc @@ -18,7 +18,10 @@ bool QtSound::play(AudibleAlert alert) { void QtSound::stop() { for (auto &kv : sounds) { - kv.second.stop(); + // Only stop repeating sounds + if (sound_map[kv.first].second != 0) { + kv.second.stop(); + } } }