Skip to content

Commit

Permalink
soundd: use setLoopCount(0) to stop repeating sound (commaai#23076)
Browse files Browse the repository at this point in the history
* use setLoopCount(0) to stop sound

* print default backend name
  • Loading branch information
deanlee authored Dec 3, 2021
1 parent 599c07e commit 3588574
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion selfdrive/ui/soundd/sound.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 3588574

Please sign in to comment.