Add coop_mock_game: animated, frame-numbered A/V test game (DX11 + DX12)

A tiny test "game" for exercising the capture/audio/hook paths. Opens a normal
window and renders an animated pattern -- moving bar + per-frame background so
motion (and dropped frames) are obvious -- with a top-left block whose RGB
encodes the exact frame number, so a capture test can decode it and detect
dropped / duplicated / stale frames. Selectable backend (dx11 / dx12 today),
behind a RenderBackend interface so OpenGL/Vulkan can be added. With audio args
it also plays a configurable WASAPI tone (shared ToneSource), so it's a full A/V
source with a window (unlike coop_tone).

  coop_mock_game.exe [dx11|dx12] [seconds] [rate] [channels] [bits] [pcm|float]

Milestone 1 of the mock-game roadmap item (the stress-test suite follows).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-22 02:09:41 +02:00
parent b00b516cdb
commit 549b91a9ce
7 changed files with 561 additions and 0 deletions

View File

@@ -120,6 +120,7 @@ if(COOP_BUILD_HOOK)
add_subdirectory(hook)
enable_testing()
add_subdirectory(tools/audio_tone) # coop_tone: audio source for the loopback test
add_subdirectory(tools/mock_game) # coop_mock_game: A/V test game for the capture/hook tests
add_subdirectory(tools/audio_probe) # coop_audio_probe: inject + diagnose the render-hook
add_subdirectory(tools/input_probe) # coop_input_probe: inject + forward synthetic input
add_subdirectory(tests)