0
|
1 #include "AIL.h"
|
|
2
|
|
3
|
|
4
|
|
5
|
|
6 int (__stdcall *mss32_AIL_startup)() = 0;
|
|
7 HREDBOOK (__stdcall *mss32_AIL_redbook_open_drive)(long) = 0;
|
|
8 int (__stdcall *mss32_AIL_set_preference)(unsigned int, int) = 0;
|
|
9 int (__stdcall *mss32_AIL_waveOutOpen)(HDIGDRIVER *, HWAVEOUT *, int, WAVEFORMAT *) = 0;
|
|
10 int (__stdcall *mss32_AIL_get_preference)(unsigned int) = 0;
|
|
11 int (__stdcall *mss32_AIL_digital_configuration)(HDIGDRIVER, int *, int *, char *) = 0;
|
|
12 HSAMPLE (__stdcall *mss32_AIL_allocate_sample_handle)(HDIGDRIVER) = 0;
|
|
13 unsigned int (__stdcall *mss32_AIL_redbook_tracks)(HREDBOOK) = 0;
|
|
14 int (__stdcall *mss32_AIL_redbook_volume)(HREDBOOK) = 0;
|
|
15 unsigned int (__stdcall *mss32_AIL_redbook_stop)(HREDBOOK) = 0;
|
|
16 void (__stdcall *mss32_AIL_set_digital_master_volume)(HDIGDRIVER, float) = 0;
|
|
17 int (__stdcall *mss32_AIL_redbook_set_volume)(HREDBOOK, int) = 0;
|
|
18 unsigned int (__stdcall *mss32_AIL_redbook_pause)(HREDBOOK) = 0;
|
|
19 void (__stdcall *mss32_AIL_redbook_track_info)(HREDBOOK, unsigned int, unsigned int *, unsigned int *) = 0;
|
|
20 unsigned int (__stdcall *mss32_AIL_redbook_play)(HREDBOOK, unsigned int, unsigned int) = 0;
|
|
21 unsigned int (__stdcall *mss32_AIL_redbook_resume)(HREDBOOK) = 0;
|
|
22 AIL::Sample::Status (__stdcall *mss32_AIL_sample_status)(HSAMPLE) = 0;
|
|
23 int (__stdcall *mss32_AIL_sample_volume)(HSAMPLE) = 0;
|
|
24 int (__stdcall *mss32_AIL_enumerate_3D_providers)(int *, HPROVIDER *, char **) = 0;
|
|
25 DWORD (__stdcall *mss32_AIL_open_3D_provider)(HPROVIDER) = 0;
|
|
26 int (__stdcall *mss32_AIL_end_sample)(HSAMPLE) = 0;
|
|
27 int (__stdcall *mss32_AIL_set_sample_volume)(HSAMPLE, long) = 0;
|
|
28 int (__stdcall *mss32_AIL_set_sample_pan)(HSAMPLE, long) = 0;
|
|
29 void (__stdcall *mss32_AIL_end_sequence)(HSEQUENCE) = 0;
|
|
30 void (__stdcall *mss32_AIL_pause_stream)(HSTREAM, int) = 0;
|
|
31 void (__stdcall *mss32_AIL_init_sample)(HSAMPLE) = 0;
|
|
32 int (__stdcall *mss32_AIL_set_sample_file)(HSAMPLE, const void *, int) = 0;
|
|
33 void (__stdcall *mss32_AIL_set_sample_loop_count)(HSAMPLE, int) = 0;
|
|
34 void (__stdcall *mss32_AIL_set_sample_playback_rate)(HSAMPLE, int) = 0;
|
|
35 void (__stdcall *mss32_AIL_sample_ms_position)(HSAMPLE, int *, int *) = 0;
|
|
36 void (__stdcall *mss32_AIL_start_sample)(HSAMPLE) = 0;
|
|
37 AILFILETYPE (__stdcall *mss32_AIL_file_type)(void *, int) = 0;
|
|
38 int (__stdcall *mss32_AIL_WAV_info)(void *, AILSOUNDINFO *) = 0;
|
|
39 int (__stdcall *mss32_AIL_decompress_ADPCM)(AILSOUNDINFO *, void *, void *) = 0;
|
|
40 HREDBOOK (__stdcall *mss32_AIL_redbook_open)(int) = 0;
|
|
41 void MSS32_DLL_Initialize()
|
|
42 {
|
|
43 HMODULE pDll = LoadLibraryW(L"mss32.dll");
|
|
44
|
|
45 mss32_AIL_startup = (int (__stdcall *)())GetProcAddress(pDll, "_AIL_startup@0");
|
|
46 mss32_AIL_redbook_open_drive = (HREDBOOK (__stdcall *)(long))GetProcAddress(pDll, "_AIL_redbook_open_drive@4");
|
|
47 mss32_AIL_set_preference = (int (__stdcall *)(unsigned int, int))GetProcAddress(pDll, "_AIL_set_preference@8");
|
|
48 mss32_AIL_waveOutOpen = (int (__stdcall *)(HDIGDRIVER *, HWAVEOUT *, int, WAVEFORMAT *))GetProcAddress(pDll, "_AIL_waveOutOpen@16");
|
|
49 mss32_AIL_get_preference = (int (__stdcall *)(unsigned int))GetProcAddress(pDll, "_AIL_get_preference@4");
|
|
50 mss32_AIL_digital_configuration = (int (__stdcall *)(HDIGDRIVER, int *, int *, char *))GetProcAddress(pDll, "_AIL_digital_configuration@16");
|
|
51 mss32_AIL_allocate_sample_handle = (HSAMPLE (__stdcall *)(HDIGDRIVER))GetProcAddress(pDll, "_AIL_allocate_sample_handle@4");
|
|
52 mss32_AIL_redbook_tracks = (unsigned int (__stdcall *)(HREDBOOK))GetProcAddress(pDll, "_AIL_redbook_tracks@4");
|
|
53 mss32_AIL_redbook_volume = (int (__stdcall *)(HREDBOOK))GetProcAddress(pDll, "_AIL_redbook_volume@4");
|
|
54 mss32_AIL_redbook_stop = (unsigned int (__stdcall *)(HREDBOOK))GetProcAddress(pDll, "_AIL_redbook_stop@4");
|
|
55 mss32_AIL_set_digital_master_volume = (void (__stdcall *)(HDIGDRIVER, float))GetProcAddress(pDll, "_AIL_set_digital_master_volume@8");
|
|
56 mss32_AIL_redbook_set_volume = (int (__stdcall *)(HREDBOOK, int))GetProcAddress(pDll, "_AIL_redbook_set_volume@8");
|
|
57 mss32_AIL_redbook_pause = (unsigned int (__stdcall *)(HREDBOOK))GetProcAddress(pDll, "_AIL_redbook_pause@4");
|
|
58 mss32_AIL_redbook_track_info = (void (__stdcall *)(HREDBOOK, unsigned int, unsigned int *, unsigned int *))GetProcAddress(pDll, "_AIL_redbook_track_info@16");
|
|
59 mss32_AIL_redbook_play = (unsigned int (__stdcall *)(HREDBOOK, unsigned int, unsigned int))GetProcAddress(pDll, "_AIL_redbook_play@12");
|
|
60 mss32_AIL_redbook_resume = (unsigned int (__stdcall *)(HREDBOOK))GetProcAddress(pDll, "_AIL_redbook_resume@4");
|
|
61 mss32_AIL_sample_status = (AIL::Sample::Status (__stdcall *)(HSAMPLE))GetProcAddress(pDll, "_AIL_sample_status@4");
|
|
62 mss32_AIL_sample_volume = (int (__stdcall *)(HSAMPLE))GetProcAddress(pDll, "_AIL_sample_volume@4");
|
|
63 mss32_AIL_enumerate_3D_providers = (int (__stdcall *)(int *, HPROVIDER *, char **))GetProcAddress(pDll, "_AIL_enumerate_3D_providers@12");
|
|
64 mss32_AIL_open_3D_provider = (DWORD (__stdcall *)(HPROVIDER))GetProcAddress(pDll, "_AIL_open_3D_provider@4");
|
|
65 mss32_AIL_end_sample = (int (__stdcall *)(HSAMPLE))GetProcAddress(pDll, "_AIL_end_sample@4");
|
|
66 mss32_AIL_set_sample_volume = (int (__stdcall *)(HSAMPLE, long))GetProcAddress(pDll, "_AIL_set_sample_volume@8");
|
|
67 mss32_AIL_set_sample_pan = (int (__stdcall *)(HSAMPLE, long))GetProcAddress(pDll, "_AIL_set_sample_pan@8");
|
|
68 mss32_AIL_end_sequence = (void (__stdcall *)(HSEQUENCE))GetProcAddress(pDll, "_AIL_end_sequence@4");
|
|
69 mss32_AIL_pause_stream = (void (__stdcall *)(HSTREAM, int))GetProcAddress(pDll, "_AIL_pause_stream@8");
|
|
70 mss32_AIL_init_sample = (void (__stdcall *)(HSAMPLE))GetProcAddress(pDll, "_AIL_init_sample@4");
|
|
71 mss32_AIL_set_sample_file = (int (__stdcall *)(HSAMPLE, const void *, int))GetProcAddress(pDll, "_AIL_set_sample_file@12");
|
|
72 mss32_AIL_set_sample_loop_count = (void (__stdcall *)(HSAMPLE, int))GetProcAddress(pDll, "_AIL_set_sample_loop_count@8");
|
|
73 mss32_AIL_set_sample_playback_rate = (void (__stdcall *)(HSAMPLE, int))GetProcAddress(pDll, "_AIL_set_sample_playback_rate@8");
|
|
74 mss32_AIL_sample_ms_position = (void (__stdcall *)(HSAMPLE, int *, int *))GetProcAddress(pDll, "_AIL_sample_ms_position@12");
|
|
75 mss32_AIL_start_sample = (void (__stdcall *)(HSAMPLE))GetProcAddress(pDll, "_AIL_start_sample@4");
|
|
76 mss32_AIL_file_type = (AILFILETYPE (__stdcall *)(void *, int))GetProcAddress(pDll, "_AIL_file_type@8");
|
|
77 mss32_AIL_WAV_info = (int (__stdcall *)(void *, AILSOUNDINFO *))GetProcAddress(pDll, "_AIL_WAV_info@8");
|
|
78 mss32_AIL_decompress_ADPCM = (int (__stdcall *)(AILSOUNDINFO *, void *, void *))GetProcAddress(pDll, "_AIL_decompress_ADPCM@12");
|
|
79 mss32_AIL_redbook_open = (HREDBOOK (__stdcall *)(int))GetProcAddress(pDll, "_AIL_redbook_open@4");
|
|
80 }
|
|
81
|
|
82
|
|
83
|
|
84 unsigned int __stdcall AIL_redbook_play(HREDBOOK hRedbook, unsigned int uStartMS, unsigned int uEndMS)
|
|
85 {
|
|
86 return (mss32_AIL_redbook_play)(hRedbook, uStartMS, uEndMS);
|
|
87 }
|
|
88
|
|
89 void __stdcall AIL_redbook_track_info(HREDBOOK hRedbook, unsigned int uTrackNum, unsigned int *pStartMS, unsigned int *pEndMS)
|
|
90 {
|
|
91 (mss32_AIL_redbook_track_info)(hRedbook, uTrackNum, pStartMS, pEndMS);
|
|
92 }
|
|
93
|
|
94 unsigned int __stdcall AIL_redbook_resume(HREDBOOK hRedbook)
|
|
95 {
|
|
96 return (mss32_AIL_redbook_resume)(hRedbook);
|
|
97 }
|
|
98
|
|
99 int __stdcall AIL_enumerate_3D_providers(int *a1, HPROVIDER *pOutProv, char **pOutName)
|
|
100 {
|
|
101 return (mss32_AIL_enumerate_3D_providers)(a1, pOutProv, pOutName);
|
|
102 }
|
|
103 HREDBOOK __stdcall AIL_redbook_open(int w)
|
|
104 {
|
|
105 return (mss32_AIL_redbook_open)(w);
|
|
106 }
|
|
107
|
|
108
|
|
109 int __stdcall AIL_sample_volume(HSAMPLE s)
|
|
110 {
|
|
111 return (mss32_AIL_sample_volume)(s);
|
|
112 }
|
|
113
|
|
114 AIL::Sample::Status __stdcall AIL_sample_status(HSAMPLE a1)
|
|
115 {
|
|
116 return (mss32_AIL_sample_status)(a1);
|
|
117 }
|
|
118
|
|
119 // sub_4D8304: using guessed type int __stdcall AIL_set_digital_master_volume(_DWORD, _DWORD);
|
|
120 void __stdcall AIL_set_digital_master_volume(HDIGDRIVER hDrv, float master_volume)
|
|
121 {
|
|
122 (mss32_AIL_set_digital_master_volume)(hDrv, master_volume);
|
|
123 }
|
|
124
|
|
125 // sub_4D8370: using guessed type int __stdcall AIL_allocate_sample_handle(_DWORD);
|
|
126 HSAMPLE __stdcall AIL_allocate_sample_handle(HDIGDRIVER hDrv)
|
|
127 {
|
|
128 return (mss32_AIL_allocate_sample_handle)(hDrv);
|
|
129 }
|
|
130
|
|
131 // sub_4D8308: using guessed type int __fastcall AIL_redbook_set_volume(_DWORD, _DWORD, _DWORD, _DWORD);
|
|
132 int __stdcall AIL_redbook_set_volume(HREDBOOK hRedbook, int volume)
|
|
133 {
|
|
134 return (mss32_AIL_redbook_set_volume)(hRedbook, volume);
|
|
135 }
|
|
136
|
|
137 // sub_4D8324: using guessed type int __stdcall AIL_redbook_stop(_DWORD);
|
|
138 unsigned int __stdcall AIL_redbook_stop(HREDBOOK hRedbook)
|
|
139 {
|
|
140 return (mss32_AIL_redbook_stop)(hRedbook);
|
|
141 }
|
|
142
|
|
143 // sub_4D835C: using guessed type int __stdcall AIL_startup();
|
|
144 int __stdcall AIL_startup()
|
|
145 {
|
|
146 return (mss32_AIL_startup)();
|
|
147 }
|
|
148
|
|
149 // sub_4D8360: using guessed type int __stdcall AIL_redbook_open_drive(_DWORD);
|
|
150 HREDBOOK __stdcall AIL_redbook_open_drive(long drive)
|
|
151 {
|
|
152 return (mss32_AIL_redbook_open_drive)(drive);
|
|
153 }
|
|
154
|
|
155 // sub_4D834C: using guessed type int __stdcall AIL_waveOutOpen(_DWORD, _DWORD, _DWORD, _DWORD);
|
|
156 int __stdcall AIL_waveOutOpen(HDIGDRIVER *drv, HWAVEOUT *phWaveOut, int wDeviceID, WAVEFORMAT *pFormat)
|
|
157 {
|
|
158 return (mss32_AIL_waveOutOpen)(drv, phWaveOut, wDeviceID, pFormat);
|
|
159 }
|
|
160
|
|
161
|
|
162 DWORD __stdcall AIL_open_3D_provider(HPROVIDER a2)
|
|
163 {
|
|
164 return (mss32_AIL_open_3D_provider)(a2);
|
|
165 }
|
|
166
|
|
167 int __stdcall AIL_3D_provider_attribute(HPROVIDER a1, const char *a2, int *a3)
|
|
168 {
|
|
169 __asm int 3
|
|
170 return 0;
|
|
171 }
|
|
172
|
|
173 // sub_4D8374: using guessed type int __stdcall AIL_redbook_tracks(_DWORD);
|
|
174 unsigned int __stdcall AIL_redbook_tracks(HREDBOOK hRedbook)
|
|
175 {
|
|
176 return (mss32_AIL_redbook_tracks)(hRedbook);
|
|
177 }
|
|
178
|
|
179 // sub_4D83B0: using guessed type int __stdcall AIL_redbook_volume(_DWORD);
|
|
180 int __stdcall AIL_redbook_volume(HREDBOOK hRedbook)
|
|
181 {
|
|
182 return (mss32_AIL_redbook_volume)(hRedbook);
|
|
183 }
|
|
184
|
|
185 // sub_4D8348: using guessed type int __stdcall AIL_set_preference(_DWORD, _DWORD);
|
|
186 int __stdcall AIL_set_preference(unsigned int number, int value)
|
|
187 {
|
|
188 return (mss32_AIL_set_preference)(number, value);
|
|
189 }
|
|
190
|
|
191 // sub_4D8350: using guessed type int __stdcall AIL_digital_configuration(_DWORD, _DWORD, _DWORD, _DWORD);
|
|
192 int __stdcall AIL_digital_configuration(HDIGDRIVER drv, int *rate, int *format, char *string)
|
|
193 {
|
|
194 return (mss32_AIL_digital_configuration)(drv, rate, format, string);
|
|
195 }
|
|
196
|
|
197 // sub_4D8354: using guessed type int __stdcall AIL_get_preference(_DWORD);
|
|
198 int __stdcall AIL_get_preference(unsigned int number)
|
|
199 {
|
|
200 return (mss32_AIL_get_preference)(number);
|
|
201 }
|
|
202
|
|
203 int __stdcall AIL_waveOutClose(_DIG_DRIVER *)
|
|
204 {
|
|
205 __asm int 3
|
|
206 return 0;
|
|
207 }
|
|
208
|
|
209 // sub_4D8320: using guessed type int __stdcall AIL_redbook_pause(_DWORD);
|
|
210 unsigned int __stdcall AIL_redbook_pause(HREDBOOK hRedbook)
|
|
211 {
|
|
212 return (mss32_AIL_redbook_pause)(hRedbook);
|
|
213 }
|
|
214
|
|
215 int __stdcall AIL_set_3D_provider_preference(HPROVIDER a1, const char *a2, int *a3)
|
|
216 {
|
|
217 __asm int 3
|
|
218 return 0;
|
|
219 }
|
|
220
|
|
221 int __stdcall AIL_allocate_3D_sample_handle(HPROVIDER)
|
|
222 {
|
|
223 __asm int 3
|
|
224 return 0;
|
|
225 }
|
|
226
|
|
227 int __stdcall AIL_set_3D_sample_float_distances(void *a1, long a2, long a3, long a4, long a5)
|
|
228 {
|
|
229 __asm int 3
|
|
230 return 0;
|
|
231 }
|
|
232
|
|
233 int __stdcall AIL_set_3D_sample_volume(void *a1, long a2)
|
|
234 {
|
|
235 __asm int 3
|
|
236 return 0;
|
|
237 }
|
|
238
|
|
239 int __stdcall AIL_release_sample_handle(void *a1)
|
|
240 {
|
|
241 __asm int 3
|
|
242 return 0;
|
|
243 }
|
|
244
|
|
245 int __stdcall AIL_release_3D_sample_handle(void *a1)
|
|
246 {
|
|
247 __asm int 3
|
|
248 return 0;
|
|
249 }
|
|
250
|
|
251 int __stdcall AIL_close_3D_provider(HPROVIDER)
|
|
252 {
|
|
253 __asm int 3
|
|
254 return 0;
|
|
255 }
|
|
256
|
|
257 int __stdcall AIL_redbook_close(HREDBOOK a1)
|
|
258 {
|
|
259 __asm int 3
|
|
260 return 0;
|
|
261 }
|
|
262
|
|
263 // sub_4D8344: using guessed type int __stdcall AIL_shutdown();
|
|
264 int __stdcall AIL_shutdown()
|
|
265 {
|
|
266 __asm int 3
|
|
267 return 0;
|
|
268 }
|
|
269
|
|
270 int __stdcall AIL_end_sample(HSAMPLE a1)
|
|
271 {
|
|
272 return (mss32_AIL_end_sample)(a1);
|
|
273 }
|
|
274
|
|
275 int __stdcall AIL_end_3D_sample(void *a1)
|
|
276 {
|
|
277 __debugbreak();
|
|
278 return 0;
|
|
279 }
|
|
280
|
|
281
|
|
282 void __stdcall AIL_end_sequence(HSEQUENCE a1)
|
|
283 {
|
|
284 (mss32_AIL_end_sequence)(a1);
|
|
285 }
|
|
286
|
|
287 void __stdcall AIL_pause_stream(HSTREAM a1, int onoff)
|
|
288 {
|
|
289 (mss32_AIL_pause_stream)(a1, onoff);
|
|
290 }
|
|
291
|
|
292 int __stdcall AIL_set_sample_file(HSAMPLE s, const void *file_image, int block)
|
|
293 {
|
|
294 return (mss32_AIL_set_sample_file)(s, file_image, block);
|
|
295 }
|
|
296
|
|
297 void __stdcall AIL_start_sample(HSAMPLE s)
|
|
298 {
|
|
299 (mss32_AIL_start_sample)(s);
|
|
300 }
|
|
301
|
|
302 void __stdcall AIL_set_sample_playback_rate(HSAMPLE s, int rate)
|
|
303 {
|
|
304 (mss32_AIL_set_sample_playback_rate)(s, rate);
|
|
305 }
|
|
306
|
|
307 void __stdcall AIL_sample_ms_position(HSAMPLE s, int *pTotalMS, int *pCurrentMS)
|
|
308 {
|
|
309 (mss32_AIL_sample_ms_position)(s, pTotalMS, pCurrentMS);
|
|
310 }
|
|
311
|
|
312 int __stdcall AIL_3D_sample_status(void *a1)
|
|
313 {
|
|
314 __asm int 3
|
|
315 return 0;
|
|
316 }
|
|
317
|
|
318 void __stdcall AIL_set_sample_loop_count(HSAMPLE s, int num)
|
|
319 {
|
|
320 (mss32_AIL_set_sample_loop_count)(s, num);
|
|
321 }
|
|
322
|
|
323 int __stdcall AIL_set_sample_volume(HSAMPLE a1, long a2)
|
|
324 {
|
|
325 return (mss32_AIL_set_sample_volume)(a1, a2);
|
|
326 }
|
|
327
|
|
328 int __stdcall AIL_3D_position(void *a1, int *a2, float *a3, long *a4)
|
|
329 {
|
|
330 __asm int 3
|
|
331 return 0;
|
|
332 }
|
|
333
|
|
334 int __stdcall AIL_set_3D_sample_file(long a1, void *a2)
|
|
335 {
|
|
336 __asm int 3
|
|
337 return 0;
|
|
338 }
|
|
339
|
|
340 int __stdcall AIL_set_3D_sample_loop_count(long a1, long a2)
|
|
341 {
|
|
342 __asm int 3
|
|
343 return 0;
|
|
344 }
|
|
345
|
|
346 int __stdcall AIL_start_3D_sample(long a1)
|
|
347 {
|
|
348 __asm int 3
|
|
349 return 0;
|
|
350 }
|
|
351
|
|
352 int __stdcall AIL_set_3D_position(void *hSample, long a2, long a3, long a4)
|
|
353 {
|
|
354 __asm int 3
|
|
355 return 0;
|
|
356 }
|
|
357
|
|
358 int __stdcall AIL_set_3D_orientation(void *hSample, long a2, long a3, long a4, long a5, long a6, long a7)
|
|
359 {
|
|
360 __asm int 3
|
|
361 return 0;
|
|
362 }
|
|
363
|
|
364 void __stdcall AIL_init_sample(HSAMPLE a1)
|
|
365 {
|
|
366 (mss32_AIL_init_sample)(a1);
|
|
367 }
|
|
368
|
|
369 int __stdcall AIL_set_sample_pan(HSAMPLE a1, long a2)
|
|
370 {
|
|
371 return (mss32_AIL_set_sample_pan)(a1, a2);
|
|
372 }
|
|
373
|
|
374
|
|
375 AILFILETYPE __stdcall AIL_file_type(void *pSoundBytes, int numBytes)
|
|
376 {
|
|
377 return (mss32_AIL_file_type)(pSoundBytes, numBytes);
|
|
378 }
|
|
379
|
|
380 int __stdcall AIL_WAV_info(void *pSoundBytes, AILSOUNDINFO *pInfo)
|
|
381 {
|
|
382 return (mss32_AIL_WAV_info)(pSoundBytes, pInfo);
|
|
383 }
|
|
384
|
|
385 int __stdcall AIL_decompress_ADPCM(AILSOUNDINFO *pInfo, void *a2, void *a3)
|
|
386 {
|
|
387 return (mss32_AIL_decompress_ADPCM)(pInfo, a2, a3);
|
|
388 }
|
|
389
|
|
390 int __stdcall AIL_mem_free_lock(void *a1)
|
|
391 {
|
|
392 __asm int 3
|
|
393 return 0;
|
|
394 } |