aboutsummaryrefslogtreecommitdiff
path: root/src/audio_core/renderer/command/command_buffer.cpp
diff options
context:
space:
mode:
authoredendev <eden-dev@proton.me>2025-04-30 18:01:26 -0700
committeredendev <eden-dev@proton.me>2025-04-30 18:01:26 -0700
commitb75251742c1ab3776f8a0e1a813a39a40effd69f (patch)
tree4fb60fe172fd3a17c064bbc66623015b137d14ff /src/audio_core/renderer/command/command_buffer.cpp
parent4cf41673ba0a1861d7409f9bfe7c6cc3ff170564 (diff)
Add more audio logging to pinpoint issues better
Diffstat (limited to 'src/audio_core/renderer/command/command_buffer.cpp')
-rw-r--r--src/audio_core/renderer/command/command_buffer.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/audio_core/renderer/command/command_buffer.cpp b/src/audio_core/renderer/command/command_buffer.cpp
index 67d43e69aa..0d37672f8a 100644
--- a/src/audio_core/renderer/command/command_buffer.cpp
+++ b/src/audio_core/renderer/command/command_buffer.cpp
@@ -21,12 +21,15 @@ namespace AudioCore::Renderer {
template <typename T, CommandId Id>
T& CommandBuffer::GenerateStart(const s32 node_id) {
if (size + sizeof(T) >= command_list.size_bytes()) {
- LOG_ERROR(
- Service_Audio,
- "Attempting to write commands beyond the end of allocated command buffer memory!");
+ LOG_ERROR(Service_Audio,
+ "CommandBuffer OVERFLOW: size={} + {} > capacity={}",
+ size_, sizeof(T), command_list.size_bytes());
UNREACHABLE();
}
+ LOG_TRACE(Service_Audio,
+ "GenerateStart: CmdId={} node={} curSize={} → newSize={}",
+ static_cast<int>(Id), node_id, size_, size_ + sizeof(T));
auto& cmd{*std::construct_at<T>(reinterpret_cast<T*>(&command_list[size]))};
cmd.magic = CommandMagic;
@@ -44,6 +47,11 @@ 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<int>(cmd.type), count, size, estimated_process_time);
}
void CommandBuffer::GeneratePcmInt16Version1Command(const s32 node_id,