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

* use setLoopCount(0) to stop sound

* print default backend name
pull/23110/head
Dean Lee 2021-12-03 08:40:10 +08:00 committed by GitHub
parent 599c07e027
commit 35885745f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}
}