From c9f8594bb941f5b395ca5d1490ff3731146c4b55 Mon Sep 17 00:00:00 2001 From: edendev Date: Wed, 30 Apr 2025 18:21:01 -0700 Subject: [PATCH] Revert "Add more audio logging to pinpoint issues better" This reverts commit 01b790ff297e9178c589b38a6e7d1c6b849674f6. --- src/audio_core/common/workbuffer_allocator.h | 11 +++++------ src/audio_core/renderer/command/command_buffer.cpp | 14 +++----------- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/src/audio_core/common/workbuffer_allocator.h b/src/audio_core/common/workbuffer_allocator.h index 215164d0fb..fb89f97fea 100644 --- a/src/audio_core/common/workbuffer_allocator.h +++ b/src/audio_core/common/workbuffer_allocator.h @@ -7,7 +7,7 @@ #include "common/alignment.h" #include "common/assert.h" -#include "common/common_types.h" +#include "common/common_types.h" namespace AudioCore { /** @@ -35,14 +35,13 @@ public: auto current{buffer + offset}; auto aligned_buffer{Common::AlignUp(current, alignment)}; if (aligned_buffer + byte_size <= buffer + size) { - LOG_DEBUG(Service_Audio, - "Workbuffer Allocate: T={} count={} align={} → ptr=0x{:X} offset=0x{:X}", - typeid(T).name(), count, alignment, aligned_buffer, offset); out = aligned_buffer; offset = byte_size - buffer + aligned_buffer; } else { - LOG_ERROR(Service_Audio, - "Workbuffer OVERFLOW: size=0x{:X} offset=0x{:X} need=0x{:X} align=0x{:X}", + LOG_ERROR( + Service_Audio, + "Allocated buffer was too small to hold new alloc.\nAllocator size={:08X}, " + "offset={:08X}.\nAttempting to allocate {:08X} with alignment={:02X}", size, offset, byte_size, alignment); count = 0; } diff --git a/src/audio_core/renderer/command/command_buffer.cpp b/src/audio_core/renderer/command/command_buffer.cpp index 0d37672f8a..67d43e69aa 100644 --- a/src/audio_core/renderer/command/command_buffer.cpp +++ b/src/audio_core/renderer/command/command_buffer.cpp @@ -21,15 +21,12 @@ namespace AudioCore::Renderer { template T& CommandBuffer::GenerateStart(const s32 node_id) { if (size + sizeof(T) >= command_list.size_bytes()) { - LOG_ERROR(Service_Audio, - "CommandBuffer OVERFLOW: size={} + {} > capacity={}", - size_, sizeof(T), command_list.size_bytes()); + LOG_ERROR( + Service_Audio, + "Attempting to write commands beyond the end of allocated command buffer memory!"); UNREACHABLE(); } - LOG_TRACE(Service_Audio, - "GenerateStart: CmdId={} node={} curSize={} → newSize={}", - static_cast(Id), node_id, size_, size_ + sizeof(T)); auto& cmd{*std::construct_at(reinterpret_cast(&command_list[size]))}; cmd.magic = CommandMagic; @@ -47,11 +44,6 @@ void CommandBuffer::GenerateEnd(T& cmd) { estimated_process_time += cmd.estimated_process_time; size += sizeof(T); count++; - - // Trace completion: how many commands & bytes are now committed - LOG_TRACE(Service_Audio, - "GenerateEnd<{}>: totalCmds={} totalBytes={} estTime={}", - static_cast(cmd.type), count, size, estimated_process_time); } void CommandBuffer::GeneratePcmInt16Version1Command(const s32 node_id,