Audio render-hook M4: audio panel source indicator + stream-count debug view
Surfaces the render-hook diagnostics in the Audio panel. - HookStatusView / IpcServer::hook_status(): carry audio_streams_seen + audio_streams[] from the hook's back-channel. - InjectionPanel: expose hook_status() so the audio panel can read the counts. - AudioPanel::draw_ui(HookStatusView): show the active Source (green Hooked vs amber Loopback); only warn about the local echo on the loopback path. Add the required render-stream table: one row per stream with format, cumulative frames, the primary tagged, and a live/idle dot derived from frame-count deltas. Notes overflow when the game exceeds kMaxAudioStreams slots. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
// Owns the audio-mirror pipeline (WASAPI process loopback + re-render) and its
|
||||
// UI. The target process is derived from the injected game's window.
|
||||
// Owns the audio-mirror pipeline (render-hook ring or WASAPI process loopback +
|
||||
// re-render) and its UI. The target process is derived from the injected game's
|
||||
// window; the render-stream debug view reads the hook's diagnostics back-channel.
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include "audio/audio_loopback.hpp"
|
||||
#include "ipc/ipc_server.hpp"
|
||||
|
||||
namespace coop
|
||||
{
|
||||
@@ -19,12 +23,16 @@ public:
|
||||
target_ = target;
|
||||
}
|
||||
|
||||
void draw_ui();
|
||||
// `status` is the hook's back-channel, for the render-stream debug view.
|
||||
void draw_ui(const HookStatusView& status);
|
||||
|
||||
private:
|
||||
HWND target_ = nullptr;
|
||||
bool enabled_ = false;
|
||||
AudioMirror mirror_;
|
||||
|
||||
// Previous per-stream frame counts, to flag streams as live (advancing).
|
||||
std::uint64_t prev_frames_[kMaxAudioStreams] = {};
|
||||
};
|
||||
|
||||
} // namespace coop
|
||||
|
||||
Reference in New Issue
Block a user