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
commit 7035a19645
Notes: sideshowbarker 2024-07-17 16:23:55 +09:00

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