mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:07:36 +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
4 changed files with 9 additions and 2 deletions
|
@ -10,6 +10,10 @@
|
||||||
# cmakedefine01 AFLACLOADER_DEBUG
|
# cmakedefine01 AFLACLOADER_DEBUG
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef AUDIO_DEBUG
|
||||||
|
# cmakedefine01 AUDIO_DEBUG
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef AWAVLOADER_DEBUG
|
#ifndef AWAVLOADER_DEBUG
|
||||||
# cmakedefine01 AWAVLOADER_DEBUG
|
# cmakedefine01 AWAVLOADER_DEBUG
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -5,6 +5,7 @@ set(APIC_DEBUG ON)
|
||||||
set(APIC_SMP_DEBUG ON)
|
set(APIC_SMP_DEBUG ON)
|
||||||
set(ARP_DEBUG ON)
|
set(ARP_DEBUG ON)
|
||||||
set(ATA_DEBUG ON)
|
set(ATA_DEBUG ON)
|
||||||
|
set(AUDIO_DEBUG ON)
|
||||||
set(AWAVLOADER_DEBUG ON)
|
set(AWAVLOADER_DEBUG ON)
|
||||||
set(AFLACLOADER_DEBUG ON)
|
set(AFLACLOADER_DEBUG ON)
|
||||||
set(BBFS_DEBUG ON)
|
set(BBFS_DEBUG ON)
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <AK/Atomic.h>
|
#include <AK/Atomic.h>
|
||||||
|
#include <AK/Debug.h>
|
||||||
#include <AK/Format.h>
|
#include <AK/Format.h>
|
||||||
#include <AK/OwnPtr.h>
|
#include <AK/OwnPtr.h>
|
||||||
#include <AK/Time.h>
|
#include <AK/Time.h>
|
||||||
|
@ -97,7 +98,7 @@ void ConnectionToServer::custom_event(Core::CustomEvent&)
|
||||||
Array<Sample, AUDIO_BUFFER_SIZE> next_chunk;
|
Array<Sample, AUDIO_BUFFER_SIZE> next_chunk;
|
||||||
while (true) {
|
while (true) {
|
||||||
if (m_user_queue->is_empty()) {
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include <AK/Atomic.h>
|
#include <AK/Atomic.h>
|
||||||
#include <AK/Badge.h>
|
#include <AK/Badge.h>
|
||||||
#include <AK/ByteBuffer.h>
|
#include <AK/ByteBuffer.h>
|
||||||
|
#include <AK/Debug.h>
|
||||||
#include <AK/Queue.h>
|
#include <AK/Queue.h>
|
||||||
#include <AK/RefCounted.h>
|
#include <AK/RefCounted.h>
|
||||||
#include <AK/WeakPtr.h>
|
#include <AK/WeakPtr.h>
|
||||||
|
@ -50,7 +51,7 @@ public:
|
||||||
auto result = m_buffer->dequeue();
|
auto result = m_buffer->dequeue();
|
||||||
if (result.is_error()) {
|
if (result.is_error()) {
|
||||||
if (result.error() == Audio::AudioQueue::QueueStatus::Empty) {
|
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.
|
// Note: Even though we only check client state here, we will probably close the client much earlier.
|
||||||
if (!m_client->is_open()) {
|
if (!m_client->is_open()) {
|
||||||
dbgln("Client socket {} has closed, closing audio server connection.", m_client->client_id());
|
dbgln("Client socket {} has closed, closing audio server connection.", m_client->client_id());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue