diff --git a/README.md b/README.md index 242f773..100d7f8 100644 --- a/README.md +++ b/README.md @@ -114,8 +114,6 @@ From an in-depth review pass. Each item is fixed test-first (a failing test, the as its own commit; "verify" items are confirmed real before any change, and dropped if not. Robustness (verify, then fix if real): -- **Swallowed audio loopback `start()` failures** — surface a process-loopback activation failure - distinctly from "no correlation" in the verifier + loopback. - **Permissive injector bitness gate** — `IsWow64Process2` failure is treated as 64-bit; fall back to `IsWow64Process` instead of mis-injecting. - **Ignored HRESULT/BOOL returns** — `CreateShaderResourceView`, `GetClientRect`/`ClientToScreen`, diff --git a/host/src/audio/audio_format_verifier.cpp b/host/src/audio/audio_format_verifier.cpp index 6bf2677..51ce5f1 100644 --- a/host/src/audio/audio_format_verifier.cpp +++ b/host/src/audio/audio_format_verifier.cpp @@ -156,12 +156,20 @@ FormatVerification verify_stream_format(DWORD pid, AudioRingHeader* ring, unsign std::vector loop_bytes; ProcessLoopbackCapture loop; const std::uint32_t loop_block = dev_wfx->nBlockAlign; - loop.start(pid, dev_wfx, [&](const BYTE* data, std::uint32_t frames, bool silent) { - if (!silent && data != nullptr) - { - loop_bytes.insert(loop_bytes.end(), data, data + static_cast(frames) * loop_block); - } - }); + if (!loop.start(pid, dev_wfx, [&](const BYTE* data, std::uint32_t frames, bool silent) { + if (!silent && data != nullptr) + { + loop_bytes.insert(loop_bytes.end(), data, data + static_cast(frames) * loop_block); + } + })) + { + // Distinguish "couldn't activate process loopback" from "captured fine but didn't correlate": + // without the ground-truth post-mix path there's nothing to correlate against, so bail now + // (don't burn the window capturing only the hook side) and leave the diagnostic visible. + OutputDebugStringA("coop: verify_stream_format -- process-loopback activation failed; cannot verify format\n"); + ring->verify_capture.store(0, std::memory_order_release); + return result; + } // Pull the hook's pre-mix bytes out of the ring across the window. std::vector hook_bytes;