mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-05 08:10:40 -07:00
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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user