summaryrefslogtreecommitdiffstats
path: root/src/audio/SampleManager.cpp
blob: fbeb49ed88e1ad82cd21d857c0d7794ea521690f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#include "common.h"
#include "patcher.h"
#include "SampleManager.h"

CSampleManager &cSampleManager = *(CSampleManager *)0x7341E0;

uint32 &nNumOfMp3Files = *(uint32 *)0x95CC00;
uint8 &num3DProvidersAvailable = *(uint8 *)0x734237;
uint32 *asName3DProviders = (uint32 *)0x734238;

bool CSampleManager::IsMP3RadioChannelAvailable() {
	return nNumOfMp3Files != 0;
}

WRAPPER
bool CSampleManager::IsSampleBankLoaded(uint8) { EAXJMP(0x567130); }

WRAPPER
void CSampleManager::UnloadSampleBank(uint8) { EAXJMP(0x567110); }

WRAPPER
void
CSampleManager::Terminate()
{
	EAXJMP(0x566DC0);
}

WRAPPER
bool
CSampleManager::Initialise()
{
	EAXJMP(0x566530);
}

WRAPPER
int32
CSampleManager::GetActiveSamples()
{
	EAXJMP(0x565970);
}

WRAPPER void
CSampleManager::ReleaseDigitalHandle()
{
	EAXJMP(0x5664B0);
}

WRAPPER
void
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