Files
CoopAllTheThings/host/CMakeLists.txt
BlackMark 663d86e6ec Phase 2: audio mirror via WASAPI process loopback
Mirror the real game's audio so Steam Remote Play Together (which streams the
host's own audio session) carries it to the guest. The host captures the game
by PID via WASAPI process loopback and re-renders it on the default endpoint;
the game still plays locally too (accepted "double audio" for now).

- ProcessLoopbackCapture: process-loopback capture client, frame-sink + stats.
  The completion handler must be agile (IAgileObject) or
  ActivateAudioInterfaceAsync rejects every call with E_ILLEGAL_METHOD_CALL.
- AudioMirror: wraps capture with an event-driven render client and a primed
  ring buffer; AudioPanel drives it from the injected game's window/PID.
- coop_tone: standalone WASAPI sine-wave process used as a known audio source.
- audio_loopback_test (CTest): captures coop_tone by PID and asserts non-silent
  audio arrives, so the path is verifiable without a second Steam account.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 10:21:27 +02:00

37 lines
912 B
CMake

add_executable(coop_host WIN32
src/main.cpp
src/d3d11_window.cpp
src/imgui_layer.cpp
src/debug_overlay.cpp
src/injection_panel.cpp
src/capture_panel.cpp
src/audio_panel.cpp
src/input/xinput_source.cpp
src/inject/process_list.cpp
src/inject/injector.cpp
src/ipc/ipc_server.cpp
src/capture/frame_renderer.cpp
src/capture/window_capture.cpp
src/audio/audio_loopback.cpp
src/audio/process_loopback_capture.cpp)
target_include_directories(coop_host PRIVATE src)
# Process-loopback capture (AUDIOCLIENT_ACTIVATION_TYPE_PROCESS_LOOPBACK) needs the
# Windows 10 20H1 (NTDDI_WIN10_CO) headers; raise the target SDK version for it.
target_compile_definitions(coop_host PRIVATE NTDDI_VERSION=0x0A00000B)
target_link_libraries(coop_host PRIVATE
coop_common
imgui
d3d11
dxgi
dwmapi
d3dcompiler
windowsapp
xinput
mmdevapi
ole32)
set_target_properties(coop_host PROPERTIES OUTPUT_NAME "coop_host")