Fix stale comments
- hook_guard.hpp top block: described removal as `hook = {}` (destroy/reset); the
model is now persistent disable_for_removal (never destroyed mid-session, the
trampoline stays alive). Updated to match.
- input_source.hpp: SteamInputSource is no longer "future" -- it exists and is
opt-in; reworded.
- audio_ring.hpp: format_generation actually bumps on every set_format (not
"reserved, v1 sets once"); verify_capture is a 4-byte atomic guarded by the
version gate (not "repurposed from a reserved byte old builds saw"); and the
SharedBlock is no longer "20-byte pads".
- audio_format_verifier.cpp: dropped a dead `(void)recover_layout;` with a stale
"step (a) only" comment -- the parameter is actually used.
Comment-only except the dead (void) cast.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
//
|
||||
// The injected hook (coop_hook.dll) captures the game's WASAPI render frames and
|
||||
// is the sole *producer*; the host (coop_host.exe) is the sole *consumer* and
|
||||
// re-renders the frames for Steam Remote Play Together. This is a separate,
|
||||
// larger mapping from the input/status SharedBlock (which is only 20-byte pads
|
||||
// and can't hold PCM): a header followed by a byte ring of `capacity` bytes.
|
||||
// re-renders the frames for Steam Remote Play Together. This is a separate, larger mapping from the
|
||||
// input/status SharedBlock (which holds fixed-size POD state, not bulk PCM): a header followed by a
|
||||
// byte ring of `capacity` bytes.
|
||||
//
|
||||
// Lock-free SPSC with free-running 64-bit positions (release on publish, acquire
|
||||
// on read) — the same cross-process atomic model as the input seqlock. POD and
|
||||
@@ -58,9 +58,9 @@ struct AudioRingHeader
|
||||
// (stream counting in HookStatus still runs regardless of this flag).
|
||||
std::atomic<std::uint32_t> capture_enabled;
|
||||
|
||||
// Producer publishes the captured stream's format once, then sets
|
||||
// format_valid=1 (release). format_generation is reserved so a future
|
||||
// mid-session device re-init can be made forward-compatible; v1 sets once.
|
||||
// Producer publishes the captured stream's format, then sets format_valid=1 (release).
|
||||
// format_generation bumps on every (re)publish (audio_ring_set_format), so the host can notice a
|
||||
// mid-session format change (a device re-init, or a measured-rate / override update).
|
||||
std::atomic<std::uint32_t> format_valid;
|
||||
std::atomic<std::uint32_t> format_generation;
|
||||
|
||||
@@ -92,8 +92,8 @@ struct AudioRingHeader
|
||||
// capture both the hook (pre-mix) and a parallel process-loopback (post-mix) of the same audio
|
||||
// and cross-correlate them to recover the true sample rate (and, in step b, channels/bit-depth)
|
||||
// from ground truth instead of guessing. Inert (0) by default -- normal capture is unaffected,
|
||||
// so it never changes the shipping no-echo path. Repurposed from `reserved`, so the layout and
|
||||
// size are unchanged (old builds saw it as a zero reserved byte).
|
||||
// so it never changes the shipping no-echo path. It's a 4-byte atomic carved out of the header's
|
||||
// reserved space; the version gate (kAudioRingVersion) rejects any layout that doesn't match.
|
||||
std::atomic<std::uint32_t> verify_capture;
|
||||
|
||||
std::uint8_t reserved[36];
|
||||
|
||||
Reference in New Issue
Block a user