From e0dce41ddf54ee20d98127166b60e60c2935cc2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?kleines=20Filmr=C3=B6llchen?= Date: Sat, 24 Jun 2023 13:45:06 +0200 Subject: [PATCH] AudioServer: Add a hack to make audio "just work" on HDA for now This should be fixed properly, but we have decided that a quick hack is fine so that audio "just works" for most people. --- Userland/Services/AudioServer/Mixer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Userland/Services/AudioServer/Mixer.cpp b/Userland/Services/AudioServer/Mixer.cpp index d30593dbb05..4826cf15981 100644 --- a/Userland/Services/AudioServer/Mixer.cpp +++ b/Userland/Services/AudioServer/Mixer.cpp @@ -57,7 +57,10 @@ void Mixer::mix() { Threading::MutexLocker const locker(m_pending_mutex); // While we have nothing to mix, wait on the condition. - m_mixing_necessary.wait_while([this, &active_mix_queues]() { return m_pending_mixing.is_empty() && active_mix_queues.is_empty(); }); + // HACK: HDA is currently broken when we don't constantly feed it a buffer stream. + // Commenting out this line makes it "just work" for the time being. Please add this line back once the issue is fixed. + // See: + // m_mixing_necessary.wait_while([this, &active_mix_queues]() { return m_pending_mixing.is_empty() && active_mix_queues.is_empty(); }); if (!m_pending_mixing.is_empty()) { active_mix_queues.extend(move(m_pending_mixing)); m_pending_mixing.clear();