1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 07:07:44 +00:00

AK+LibAudio+AudioServer: Silence very noisy debug statements by default

These are spammed quite heavily on the debug console, especially at the
end of audio playback.
This commit is contained in:
Timothy Flynn 2023-06-11 13:26:49 -04:00 committed by Andreas Kling
parent 976d9b32d6
commit 936ec94f81
4 changed files with 9 additions and 2 deletions

View file

@ -12,6 +12,7 @@
#include <AK/Atomic.h>
#include <AK/Badge.h>
#include <AK/ByteBuffer.h>
#include <AK/Debug.h>
#include <AK/Queue.h>
#include <AK/RefCounted.h>
#include <AK/WeakPtr.h>
@ -50,7 +51,7 @@ public:
auto result = m_buffer->dequeue();
if (result.is_error()) {
if (result.error() == Audio::AudioQueue::QueueStatus::Empty) {
dbgln("Audio client {} can't keep up!", m_client->client_id());
dbgln_if(AUDIO_DEBUG, "Audio client {} can't keep up!", m_client->client_id());
// Note: Even though we only check client state here, we will probably close the client much earlier.
if (!m_client->is_open()) {
dbgln("Client socket {} has closed, closing audio server connection.", m_client->client_id());