From 95f54ffb398ecd288573384de0d9d983eab99afb Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Fri, 3 Dec 2021 08:40:10 +0800 Subject: [PATCH] soundd: use setLoopCount(0) to stop repeating sound (#23076) * use setLoopCount(0) to stop sound * print default backend name old-commit-hash: 35885745f1b4fcaafee2ed7276de491e6df018d2 --- selfdrive/ui/soundd/sound.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/ui/soundd/sound.cc b/selfdrive/ui/soundd/sound.cc index cbb55f6f78..766c37a51c 100644 --- a/selfdrive/ui/soundd/sound.cc +++ b/selfdrive/ui/soundd/sound.cc @@ -65,7 +65,7 @@ void Sound::setAlert(const Alert &alert) { for (auto &[s, loops] : sounds) { // Only stop repeating sounds if (s->loopsRemaining() > 1 || s->loopsRemaining() == QSoundEffect::Infinite) { - s->stop(); + s->setLoopCount(0); } }