mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-02 12:30:31 +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:
parent
976d9b32d6
commit
936ec94f81
Notes:
sideshowbarker
2024-07-17 06:46:15 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/936ec94f81 Pull-request: https://github.com/SerenityOS/serenity/pull/19367
4 changed files with 9 additions and 2 deletions
|
@ -10,6 +10,10 @@
|
|||
# cmakedefine01 AFLACLOADER_DEBUG
|
||||
#endif
|
||||
|
||||
#ifndef AUDIO_DEBUG
|
||||
# cmakedefine01 AUDIO_DEBUG
|
||||
#endif
|
||||
|
||||
#ifndef AWAVLOADER_DEBUG
|
||||
# cmakedefine01 AWAVLOADER_DEBUG
|
||||
#endif
|
||||
|
|
|
@ -5,6 +5,7 @@ set(APIC_DEBUG ON)
|
|||
set(APIC_SMP_DEBUG ON)
|
||||
set(ARP_DEBUG ON)
|
||||
set(ATA_DEBUG ON)
|
||||
set(AUDIO_DEBUG ON)
|
||||
set(AWAVLOADER_DEBUG ON)
|
||||
set(AFLACLOADER_DEBUG ON)
|
||||
set(BBFS_DEBUG ON)
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
|
||||
#include <AK/Atomic.h>
|
||||
#include <AK/Debug.h>
|
||||
#include <AK/Format.h>
|
||||
#include <AK/OwnPtr.h>
|
||||
#include <AK/Time.h>
|
||||
|
@ -97,7 +98,7 @@ void ConnectionToServer::custom_event(Core::CustomEvent&)
|
|||
Array<Sample, AUDIO_BUFFER_SIZE> next_chunk;
|
||||
while (true) {
|
||||
if (m_user_queue->is_empty()) {
|
||||
dbgln("Reached end of provided audio data, going to sleep");
|
||||
dbgln_if(AUDIO_DEBUG, "Reached end of provided audio data, going to sleep");
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue