This commit is contained in:
MihailRis
2024-02-27 19:19:53 +03:00
parent acd5d11378
commit 4a233d72ed
+2
View File
@@ -39,6 +39,7 @@ void audio::setListener(
void remove_lower_priority_speaker(int priority) {
for (auto it = speakers.begin(); it != speakers.end();) {
if (it->second->getPriority() < priority && it->second->isPaused()) {
it->second->stop();
speakers.erase(it);
return;
}
@@ -46,6 +47,7 @@ void remove_lower_priority_speaker(int priority) {
}
for (auto it = speakers.begin(); it != speakers.end();) {
if (it->second->getPriority() < priority) {
it->second->stop();
speakers.erase(it);
return;
}