0
|
1 #pragma once
|
|
2 #include "OSAPI.h"
|
|
3
|
|
4
|
|
5
|
|
6
|
|
7
|
|
8
|
|
9
|
|
10 #pragma pack(push, 1)
|
|
11 struct _PROVIDER {char unk_0;};
|
|
12 struct _SAMPLE {char unk_0;};
|
|
13 //struct _STREAM {char unk_0;};
|
|
14 struct _REDBOOK {char unk_0;};
|
|
15 struct _DIG_DRIVER {char unk_0;};
|
|
16 struct _SEQUENCE {char unk_0;};
|
|
17 #pragma pack(pop)
|
|
18
|
|
19
|
|
20
|
|
21 /* 22 */
|
|
22 #pragma pack(push, 1)
|
|
23 struct AudioPlayer_3DSample
|
|
24 {
|
|
25 inline AudioPlayer_3DSample()
|
|
26 {
|
|
27 hSample = 0;
|
|
28 field_4 = 0;
|
|
29 field_8 = 0;
|
|
30 field_C = 0;
|
|
31 }
|
|
32
|
|
33 void *hSample;
|
|
34 int field_4;
|
|
35 int field_8;
|
|
36 int field_C;
|
|
37 };
|
|
38 #pragma pack(pop)
|
|
39
|
|
40
|
|
41
|
|
42
|
|
43 /* 26 */
|
|
44 #pragma pack(push, 1)
|
|
45 struct SoundHeader
|
|
46 {
|
|
47 char pSoundName[40];
|
|
48 unsigned int uFileOffset;
|
|
49 unsigned int uCompressedSize;
|
|
50 unsigned int uDecompressedSize;
|
|
51 };
|
|
52 #pragma pack(pop)
|
|
53
|
|
54 /* 27 */
|
|
55 #pragma pack(push, 1)
|
|
56 struct MixerChannel
|
|
57 {
|
|
58 _SAMPLE *hSample;
|
|
59 int dword_000004;
|
|
60 unsigned int uSourceTrackIdx;
|
|
61 unsigned int uSourceTrackID;
|
|
62 };
|
|
63 #pragma pack(pop)
|
|
64
|
|
65
|
|
66
|
|
67
|
|
68
|
|
69 /* 308 */
|
|
70 enum SoundID
|
|
71 {
|
|
72 SOUND_0 = 0,
|
|
73 SOUND_EnteringAHouse = 0x6,
|
|
74 SOUND_8 = 0x8,
|
|
75 SOUND_27 = 0x1B,
|
|
76 SOUND_Arcomage_LoseResources = 0x78,
|
|
77 SOUND_Arcomage_AddResources = 0x79,
|
|
78 SOUND_Arcomage_TowerWallDamage = 0x7A,
|
|
79 SOUND_Arcomage_DrawCard = 0x7B,
|
|
80 SOUND_Arcomage_ProductionDamage = 0x7D,
|
|
81 SOUND_Arcomage_ProductionUpgrade = 0x7E,
|
|
82 SOUND_Arcomage_127 = 0x7F,
|
|
83 SOUND_Arcomage_128 = 0x80,
|
|
84 SOUND_Arcomage_TowerUpgrade = 0x81,
|
|
85 SOUND_Arcomage_WallUpgrade = 0x84,
|
|
86 SOUND_GoldReceived = 0xC8,
|
|
87 SOUND_PlayerCantCastSpell = 0xD1,
|
|
88 SOUND_Bell = 0xD9,
|
|
89 SOUND_20001 = 0x4E21,
|
|
90 };
|
|
91
|
|
92 /* 20 */
|
|
93 #pragma pack(push, 1)
|
|
94 struct AudioPlayer
|
|
95 {
|
|
96 //----- (004A9669) --------------------------------------------------------
|
|
97 AudioPlayer():
|
|
98 bPlayerReady(false)
|
|
99 {
|
|
100 uMixerChannels = 16;
|
|
101 field_2D0_time_left = 256;
|
|
102 uNumRedbookTracks = 0;
|
|
103 uCurrentMusicTrackLength = 0;
|
|
104 field_2D4 = 0;
|
|
105 s3DSoundVolume = 127;
|
|
106 }
|
|
107
|
|
108 void SetMusicVolume(int vol);
|
|
109 void SetMasterVolume(unsigned int uVolume);
|
|
110 void _4AA258(int a2);
|
|
111 void PlaySound(SoundID eSoundID, signed int a3, unsigned int uNumRepeats, signed int a5, signed int a6, int a7, unsigned int uVolume, int sPlaybackRate);
|
|
112 void _4AAFCF();
|
|
113 void StopChannels(int uStartChannel, int uEndChannel);
|
|
114 void LoadAudioSnd();
|
|
115 void Initialize(HWND hWnd);
|
|
116 LSTATUS CheckA3DSupport(char a2);
|
|
117 void Release();
|
|
118 void _4ABE55(MixerChannel *pChannel);
|
|
119 void _4ABF23(AudioPlayer_3DSample *a2);
|
|
120 void SetEAXPreferences();
|
|
121 void SetMapEAX();
|
|
122 int _4AC0A2();
|
|
123 void PlayMusicTrack(unsigned int uTrackID);
|
|
124 void __cdecl MessWithChannels();
|
|
125
|
|
126
|
|
127 unsigned int bEAXSupported;
|
|
128 unsigned int b3DSoundInitialized;
|
|
129 int s3DSoundVolume;
|
|
130 struct _PROVIDER *h3DSoundProvider;
|
|
131 int uNum3DSamples;
|
|
132 struct AudioPlayer_3DSample p3DSamples[32];
|
|
133 int field_214;
|
|
134 int sRedbookVolume;
|
|
135 char p3DSoundProvider[128];
|
|
136 unsigned int bPlayerReady;
|
|
137 HWND hWindow;
|
|
138 struct _REDBOOK *hAILRedbook;
|
|
139 struct _DIG_DRIVER *hDigDriver;
|
|
140 int dword_0002AC;
|
|
141 struct _SEQUENCE *hSequence;
|
|
142 int dword_0002B4;
|
|
143 struct SoundHeader *pSoundHeaders;
|
|
144 HANDLE hAudioSnd;
|
|
145 unsigned int uNumSoundHeaders;
|
|
146 unsigned int uMasterVolume;
|
|
147 int dword_0002C8;
|
|
148 int dword_0002CC;
|
|
149 int field_2D0_time_left;
|
|
150 int field_2D4;
|
|
151 unsigned int uCurrentMusicTrackLength;
|
|
152 unsigned int uNumRedbookTracks;
|
|
153 unsigned int uCurrentMusicTrackStartMS;
|
|
154 unsigned int uCurrentMusicTrackEndMS;
|
|
155 struct MixerChannel pMixerChannels[16];
|
|
156 int uMixerChannels;
|
|
157 int field_3EC;
|
|
158 char pDeviceNames[16][128];
|
|
159 int array_000BF0[16];
|
|
160 int array_000C30[16];
|
|
161 unsigned int uNumDevices;
|
|
162 struct _STREAM *hStream;
|
|
163 char field_C78[8];
|
|
164 int cGameCDDriveLetter;
|
|
165 };
|
|
166 #pragma pack(pop)
|
|
167
|
|
168
|
|
169
|
|
170
|
|
171
|
|
172
|
|
173
|
|
174
|
|
175 /* 325 */
|
|
176 enum SOUND_DESC_TYPE : __int32
|
|
177 {
|
|
178 SOUND_DESC_LEVEL = 0x0,
|
|
179 SOUND_DESC_SYSTEM = 0x1,
|
|
180 SOUND_DESC_SWAP = 0x2,
|
|
181 SOUND_DESC_3 = 0x3,
|
|
182 SOUND_DESC_LOCK = 0x4,
|
|
183 };
|
|
184
|
|
185 /* 326 */
|
|
186 enum SOUND_DESC_FLAGS
|
|
187 {
|
|
188 SOUND_DESC_LOCKED = 0x1,
|
|
189 SOUND_DESC_3D = 0x2,
|
|
190 };
|
|
191
|
|
192
|
|
193
|
|
194
|
|
195 #pragma pack(push, 1)
|
|
196 struct SoundDesc
|
|
197 {
|
|
198 char pSoundName[32];
|
|
199 unsigned int uSoundID;
|
|
200 SOUND_DESC_TYPE uType;
|
|
201 int uFlags;
|
|
202 void *pSoundData[17];
|
|
203 void *p3DSound;
|
|
204 int bDecompressed;
|
|
205 };
|
|
206 #pragma pack(pop)
|
|
207
|
|
208
|
|
209
|
|
210 #pragma pack(push, 1)
|
|
211 struct SoundList
|
|
212 {
|
|
213 inline SoundList():
|
|
214 uNumSounds(0), pSounds(nullptr), uTotalLoadedSoundSize(0)
|
|
215 {}
|
|
216
|
|
217 void Initialize();
|
|
218 __int16 _4A9A67(int a1, unsigned int a3);
|
|
219 int LoadSound(unsigned int a2, LPVOID lpBuffer, int uBufferSizeLeft, int *pOutSoundSize, int a6);
|
|
220 SoundDesc *Release();
|
|
221 void _4A9D79(int a2);
|
|
222 void _4A9DCD(unsigned int uSoundID, char a3);
|
|
223 void ToFile();
|
|
224 void *FromFile(void *pSerialized);
|
|
225 int FromFileTxt(const char *Args);
|
|
226
|
|
227 unsigned int uNumSounds;
|
|
228 SoundDesc *pSounds;
|
|
229 unsigned int uTotalLoadedSoundSize;
|
|
230 };
|
|
231 #pragma pack(pop)
|
|
232
|
|
233
|
|
234
|
|
235
|
|
236
|
|
237 /* 241 */
|
|
238 #pragma pack(push, 1)
|
|
239 struct Sound
|
|
240 {
|
|
241 unsigned int uID;
|
|
242 char field_4[120];
|
|
243 unsigned int *pSoundData;
|
|
244 };
|
|
245 #pragma pack(pop)
|
|
246
|
|
247
|
|
248
|
|
249
|
|
250 extern int Aureal3D_SplashScreen;
|
|
251 extern int Aureal3D_SplashAudio;
|
|
252 extern int uFindSound_BinSearch_ResultID; // weak
|
|
253 extern int uLastLoadedSoundID; // weak
|
|
254 extern int sLastTrackLengthMS;
|
|
255 extern Sound pSounds[3000];
|
|
256 extern AudioPlayer *pAudioPlayer;
|
|
257 extern SoundList *pSoundList;
|
|
258
|
|
259 extern unsigned __int8 uSoundVolumeMultiplier;
|
|
260 extern unsigned __int8 uVoicesVolumeMultiplier;
|
|
261 extern unsigned __int8 uMusicVolimeMultiplier;
|
|
262 extern int bWalkSound; // idb
|
|
263
|
|
264 extern float pSoundVolumeLevels[]; // idb
|
|
265
|
|
266
|
|
267
|
|
268
|
|
269
|
|
270
|
|
271
|
|
272
|
|
273 /* 379 */
|
|
274 #pragma pack(push, 1)
|
|
275 struct stru339_spell_sound
|
|
276 {
|
|
277 int _494836(int uSoundID, int a6);
|
|
278
|
|
279 char pSounds[44744];
|
|
280 int field_AEC8[45];
|
|
281 int field_AF7C[18];
|
|
282 int field_AFC4;
|
|
283 int pSoundsSizes[2];
|
|
284 int pSoundsOffsets[2];
|
|
285 };
|
|
286 #pragma pack(pop)
|
|
287 extern stru339_spell_sound stru_A750F8[4];
|
|
288 extern stru339_spell_sound stru_AA1058[4];
|