From 9357e5cc83f0a0df1fa259d3194a0b13cbfb374f Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Sun, 30 Jun 2019 23:58:24 +0200 Subject: ReleaseDigitalHandle --- src/audio/SampleManager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/audio/SampleManager.cpp') diff --git a/src/audio/SampleManager.cpp b/src/audio/SampleManager.cpp index 2319baec..2f27a3fa 100644 --- a/src/audio/SampleManager.cpp +++ b/src/audio/SampleManager.cpp @@ -7,3 +7,9 @@ uint32 &CSampleManager::nNumOfMp3Files = *(uint32*)0x95CC00; bool CSampleManager::IsMP3RadioChannelAvailable() { return nNumOfMp3Files != 0; } + +WRAPPER void +CSampleManager::ReleaseDigitalHandle() +{ + EAXJMP(0x5664B0); +} -- cgit v1.2.3 From 0ec77e8329210301a87fe9b9953b820c09c6505b Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Mon, 1 Jul 2019 00:07:58 +0200 Subject: RequireDigitalHandle --- src/audio/SampleManager.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/audio/SampleManager.cpp') diff --git a/src/audio/SampleManager.cpp b/src/audio/SampleManager.cpp index 2f27a3fa..ca08ad8b 100644 --- a/src/audio/SampleManager.cpp +++ b/src/audio/SampleManager.cpp @@ -1,4 +1,5 @@ #include "common.h" +#include "patcher.h" #include "SampleManager.h" CSampleManager &cSampleManager = *(CSampleManager *)0x7341E0; @@ -13,3 +14,10 @@ CSampleManager::ReleaseDigitalHandle() { EAXJMP(0x5664B0); } + +WRAPPER +void +CSampleManager::RequireDigitalHandle() +{ + EAXJMP(0x5664F0); +} -- cgit v1.2.3 From e3fcb686cc9a69a14ca10066efa330bbb9700fd6 Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Tue, 2 Jul 2019 20:35:47 +0200 Subject: More AudioManager --- src/audio/SampleManager.cpp | 71 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) (limited to 'src/audio/SampleManager.cpp') diff --git a/src/audio/SampleManager.cpp b/src/audio/SampleManager.cpp index ca08ad8b..7af3446b 100644 --- a/src/audio/SampleManager.cpp +++ b/src/audio/SampleManager.cpp @@ -3,7 +3,10 @@ #include "SampleManager.h" CSampleManager &cSampleManager = *(CSampleManager *)0x7341E0; -uint32 &CSampleManager::nNumOfMp3Files = *(uint32*)0x95CC00; + +uint32 &nNumOfMp3Files = *(uint32 *)0x95CC00; +uint8 &num3DProvidersAvailable = *(uint8 *)0x734237; +uint32 *asName3DProviders = (uint32 *)0x734238; bool CSampleManager::IsMP3RadioChannelAvailable() { return nNumOfMp3Files != 0; @@ -21,3 +24,69 @@ CSampleManager::RequireDigitalHandle() { EAXJMP(0x5664F0); } + +WRAPPER +char +CSampleManager::AutoDetect3DProviders() +{ + EAXJMP(0x565990); +} + +WRAPPER +uint8 +CSampleManager::GetCDAudioDriveLetter() +{ + EAXJMP(0x566F20); +} + +WRAPPER +void +CSampleManager::SetEffectsMasterVolume(uint8 volume) +{ + EAXJMP(0x567010); +} + +WRAPPER +void +CSampleManager::SetMusicMasterVolume(uint8 volume) +{ + EAXJMP(0x567020); +} + +WRAPPER +void +CSampleManager::SetEffectsFadeVol(uint8 volume) +{ + EAXJMP(0x567030); +} + +WRAPPER +void +CSampleManager::SetMusicFadeVol(uint8 volume) +{ + EAXJMP(0x567040); +} + +WRAPPER +void +CSampleManager::SetSpeakerConfig(uint32 config) +{ + EAXJMP(0x565900); +} + +WRAPPER +bool +CSampleManager::GetChannelUsedFlag(int32 id) +{ + EAXJMP(0x567B00); +} + +WRAPPER +void +CSampleManager::StopChannel(int32 id) +{ + EAXJMP(0x567BE0); +} +STARTPATCHES +InjectHook(0x566490, CSampleManager::IsMP3RadioChannelAvailable, PATCH_JUMP); +ENDPATCHES \ No newline at end of file -- cgit v1.2.3