Consolidate the duplicated VtableHook into one shared copy
audio_hook.cpp carried its own VtableHook class identical to the shared hook/src/vtable_hook.hpp -- two copies of the same delicate vtable-swap unhook logic to keep in sync. Drop the audio copy and use the shared one (it's in namespace coop::hook, so the in-file references resolve to it), leaving a short note on why WASAPI methods are vtable-swapped rather than inline-hooked. Update the shared header's comment to name both users (audio + DirectInput). Last item from the review pass -- the Roadmap's Current-work section is now empty (done work lives in git history); only Future work remains. Validated by audio_hook_test (the vtable swap still hooks GetService/GetBuffer/ReleaseBuffer end to end). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -108,14 +108,6 @@ default** and covers anything the hooked path doesn't.
|
||||
|
||||
## Roadmap
|
||||
|
||||
### Current work
|
||||
|
||||
From an in-depth review pass. Each item is fixed test-first (a failing test, then the fix) and lands
|
||||
as its own commit; "verify" items are confirmed real before any change, and dropped if not.
|
||||
|
||||
Code quality:
|
||||
- **Consolidate `VtableHook`** — remove the duplicate copy in `audio_hook.cpp`.
|
||||
|
||||
### Future work
|
||||
|
||||
- **Per-game profiles** — persist each game's subsystem / capture-mode / audio choices and re-apply
|
||||
|
||||
Reference in New Issue
Block a user