1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:07:35 +00:00

LibAudio: Wait for enqueuer thread to start before poking its event loop

This commit is contained in:
Andreas Kling 2023-04-26 18:45:23 +02:00 committed by Sam Atkins
parent 6990d4e025
commit 7035a19645

View file

@ -63,6 +63,8 @@ ErrorOr<void> ConnectionToServer::async_enqueue(FixedArray<Sample>&& samples)
{
if (!m_background_audio_enqueuer->is_started()) {
m_background_audio_enqueuer->start();
while (!m_enqueuer_loop)
usleep(1);
TRY(m_background_audio_enqueuer->set_priority(THREAD_PRIORITY_MAX));
}