nost: xact audio hook (#823)

## Link to GitHub Issue or related Pull Request, if one exists
Fixes #822

## Description of change
Add hooks for `libxact.dll` which only Nostalgia uses for audio. Detect
cases where the game would fail to launch (wrong number of channels) and
log a warning / deferred log.

## Testing
tested 2024102200
This commit is contained in:
bicarus
2026-07-21 15:33:30 -07:00
committed by GitHub
parent 18421ffbfe
commit 9d41ca2515
4 changed files with 404 additions and 0 deletions
+5
View File
@@ -7,6 +7,7 @@
#include <audioclient.h>
#include <mmdeviceapi.h>
#include "avs/game.h"
#include "hooks/audio/backends/mmdevice/device_enumerator.h"
#include "util/detour.h"
#include "util/logging.h"
@@ -15,6 +16,7 @@
#include "audio_private.h"
#include "acm.h"
#include "asio_proxy.h"
#include "xact.h"
#ifdef _MSC_VER
DEFINE_GUID(CLSID_MMDeviceEnumerator,
@@ -159,6 +161,9 @@ namespace hooks::audio {
// general hooks
CoCreateInstance_orig = detour::iat_try("CoCreateInstance", CoCreateInstance_hook);
if (avs::game::is_model("PAN")) {
hooks::audio::xact::init();
}
}
void stop() {