1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:47:34 +00:00

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

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