soundd: use setLoopCount(0) to stop repeating sound (#23076)

* use setLoopCount(0) to stop sound

* print default backend name
old-commit-hash: 35885745f1
commatwo_master
Dean Lee 4 years ago committed by GitHub
parent 15bac98ad4
commit 95f54ffb39
  1. 2
      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);
}
}

Loading…
Cancel
Save