AudioServer: Remove any pending mixer queues whose client disconnected

We were pumping the sound device full of silence even after the last
audio client disconnected.
This commit is contained in:
Andreas Kling 2019-12-22 18:30:43 +01:00
parent 11d49aedd8
commit 823ee63095
Notes: sideshowbarker 2024-07-19 10:46:03 +09:00

View file

@ -49,6 +49,8 @@ void ASMixer::mix()
continue;
}
active_mix_queues.remove_all_matching([&](auto& entry) { return !entry->client(); });
ASample mixed_buffer[1024];
auto mixed_buffer_length = (int)(sizeof(mixed_buffer) / sizeof(ASample));