mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-13 06:51:51 +00:00
fix
This commit is contained in:
parent
acd5d11378
commit
4a233d72ed
1 changed files with 2 additions and 0 deletions
|
|
@ -39,6 +39,7 @@ void audio::setListener(
|
||||||
void remove_lower_priority_speaker(int priority) {
|
void remove_lower_priority_speaker(int priority) {
|
||||||
for (auto it = speakers.begin(); it != speakers.end();) {
|
for (auto it = speakers.begin(); it != speakers.end();) {
|
||||||
if (it->second->getPriority() < priority && it->second->isPaused()) {
|
if (it->second->getPriority() < priority && it->second->isPaused()) {
|
||||||
|
it->second->stop();
|
||||||
speakers.erase(it);
|
speakers.erase(it);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -46,6 +47,7 @@ void remove_lower_priority_speaker(int priority) {
|
||||||
}
|
}
|
||||||
for (auto it = speakers.begin(); it != speakers.end();) {
|
for (auto it = speakers.begin(); it != speakers.end();) {
|
||||||
if (it->second->getPriority() < priority) {
|
if (it->second->getPriority() < priority) {
|
||||||
|
it->second->stop();
|
||||||
speakers.erase(it);
|
speakers.erase(it);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue