Mercurial > mm7
comparison AIL.cpp @ 45:e753d08b78ec
Слияние
author | Ritor1 |
---|---|
date | Mon, 21 Jan 2013 09:19:28 +0600 |
parents | 739d8f3b50f9 |
children | d95a91011d57 |
comparison
equal
deleted
inserted
replaced
44:968e681bcceb | 45:e753d08b78ec |
---|---|
8 int (__stdcall *mss32_AIL_set_preference)(unsigned int, int) = 0; | 8 int (__stdcall *mss32_AIL_set_preference)(unsigned int, int) = 0; |
9 int (__stdcall *mss32_AIL_waveOutOpen)(HDIGDRIVER *, HWAVEOUT *, int, WAVEFORMAT *) = 0; | 9 int (__stdcall *mss32_AIL_waveOutOpen)(HDIGDRIVER *, HWAVEOUT *, int, WAVEFORMAT *) = 0; |
10 int (__stdcall *mss32_AIL_get_preference)(unsigned int) = 0; | 10 int (__stdcall *mss32_AIL_get_preference)(unsigned int) = 0; |
11 int (__stdcall *mss32_AIL_digital_configuration)(HDIGDRIVER, int *, int *, char *) = 0; | 11 int (__stdcall *mss32_AIL_digital_configuration)(HDIGDRIVER, int *, int *, char *) = 0; |
12 HSAMPLE (__stdcall *mss32_AIL_allocate_sample_handle)(HDIGDRIVER) = 0; | 12 HSAMPLE (__stdcall *mss32_AIL_allocate_sample_handle)(HDIGDRIVER) = 0; |
13 void (__stdcall *mss32_AIL_3D_provider_attribute)(HPROVIDER, char *, void *) = 0; | |
13 unsigned int (__stdcall *mss32_AIL_redbook_tracks)(HREDBOOK) = 0; | 14 unsigned int (__stdcall *mss32_AIL_redbook_tracks)(HREDBOOK) = 0; |
14 int (__stdcall *mss32_AIL_redbook_volume)(HREDBOOK) = 0; | 15 int (__stdcall *mss32_AIL_redbook_volume)(HREDBOOK) = 0; |
15 unsigned int (__stdcall *mss32_AIL_redbook_stop)(HREDBOOK) = 0; | 16 unsigned int (__stdcall *mss32_AIL_redbook_stop)(HREDBOOK) = 0; |
16 void (__stdcall *mss32_AIL_set_digital_master_volume)(HDIGDRIVER, float) = 0; | 17 void (__stdcall *mss32_AIL_set_digital_master_volume)(HDIGDRIVER, float) = 0; |
17 int (__stdcall *mss32_AIL_redbook_set_volume)(HREDBOOK, int) = 0; | 18 int (__stdcall *mss32_AIL_redbook_set_volume)(HREDBOOK, int) = 0; |
19 void (__stdcall *mss32_AIL_waveOutClose)(HDIGDRIVER) = 0; | |
18 unsigned int (__stdcall *mss32_AIL_redbook_pause)(HREDBOOK) = 0; | 20 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; | 21 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; | 22 unsigned int (__stdcall *mss32_AIL_redbook_play)(HREDBOOK, unsigned int, unsigned int) = 0; |
21 unsigned int (__stdcall *mss32_AIL_redbook_resume)(HREDBOOK) = 0; | 23 unsigned int (__stdcall *mss32_AIL_redbook_resume)(HREDBOOK) = 0; |
22 AIL::Sample::Status (__stdcall *mss32_AIL_sample_status)(HSAMPLE) = 0; | 24 AIL::Sample::Status (__stdcall *mss32_AIL_sample_status)(HSAMPLE) = 0; |
36 void (__stdcall *mss32_AIL_start_sample)(HSAMPLE) = 0; | 38 void (__stdcall *mss32_AIL_start_sample)(HSAMPLE) = 0; |
37 AILFILETYPE (__stdcall *mss32_AIL_file_type)(void *, int) = 0; | 39 AILFILETYPE (__stdcall *mss32_AIL_file_type)(void *, int) = 0; |
38 int (__stdcall *mss32_AIL_WAV_info)(void *, AILSOUNDINFO *) = 0; | 40 int (__stdcall *mss32_AIL_WAV_info)(void *, AILSOUNDINFO *) = 0; |
39 int (__stdcall *mss32_AIL_decompress_ADPCM)(AILSOUNDINFO *, void *, void *) = 0; | 41 int (__stdcall *mss32_AIL_decompress_ADPCM)(AILSOUNDINFO *, void *, void *) = 0; |
40 HREDBOOK (__stdcall *mss32_AIL_redbook_open)(int) = 0; | 42 HREDBOOK (__stdcall *mss32_AIL_redbook_open)(int) = 0; |
43 void (__stdcall *mss32_AIL_release_sample_handle)(HSAMPLE) = 0; | |
41 void MSS32_DLL_Initialize() | 44 void MSS32_DLL_Initialize() |
42 { | 45 { |
43 HMODULE pDll = LoadLibraryW(L"mss32.dll"); | 46 HMODULE pDll = LoadLibraryW(L"mss32.dll"); |
44 | 47 |
45 mss32_AIL_startup = (int (__stdcall *)())GetProcAddress(pDll, "_AIL_startup@0"); | 48 mss32_AIL_startup = (int (__stdcall *)())GetProcAddress(pDll, "_AIL_startup@0"); |
47 mss32_AIL_set_preference = (int (__stdcall *)(unsigned int, int))GetProcAddress(pDll, "_AIL_set_preference@8"); | 50 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"); | 51 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"); | 52 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"); | 53 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"); | 54 mss32_AIL_allocate_sample_handle = (HSAMPLE (__stdcall *)(HDIGDRIVER))GetProcAddress(pDll, "_AIL_allocate_sample_handle@4"); |
55 mss32_AIL_3D_provider_attribute = (void (__stdcall *)(HPROVIDER,char *, void *))GetProcAddress(pDll, "_AIL_3D_provider_attribute@12"); | |
52 mss32_AIL_redbook_tracks = (unsigned int (__stdcall *)(HREDBOOK))GetProcAddress(pDll, "_AIL_redbook_tracks@4"); | 56 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"); | 57 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"); | 58 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"); | 59 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"); | 60 mss32_AIL_redbook_set_volume = (int (__stdcall *)(HREDBOOK, int))GetProcAddress(pDll, "_AIL_redbook_set_volume@8"); |
61 mss32_AIL_waveOutClose = (void (__stdcall *)(HDIGDRIVER))GetProcAddress(pDll, "_AIL_waveOutClose@4"); | |
57 mss32_AIL_redbook_pause = (unsigned int (__stdcall *)(HREDBOOK))GetProcAddress(pDll, "_AIL_redbook_pause@4"); | 62 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"); | 63 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"); | 64 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"); | 65 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"); | 66 mss32_AIL_sample_status = (AIL::Sample::Status (__stdcall *)(HSAMPLE))GetProcAddress(pDll, "_AIL_sample_status@4"); |
75 mss32_AIL_start_sample = (void (__stdcall *)(HSAMPLE))GetProcAddress(pDll, "_AIL_start_sample@4"); | 80 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"); | 81 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"); | 82 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"); | 83 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"); | 84 mss32_AIL_redbook_open = (HREDBOOK (__stdcall *)(int))GetProcAddress(pDll, "_AIL_redbook_open@4"); |
85 mss32_AIL_release_sample_handle = (void (__stdcall *)(HSAMPLE))GetProcAddress(pDll, "_AIL_release_sample_handle@4"); | |
80 } | 86 } |
81 | 87 |
82 | 88 |
83 | 89 |
84 unsigned int __stdcall AIL_redbook_play(HREDBOOK hRedbook, unsigned int uStartMS, unsigned int uEndMS) | 90 unsigned int __stdcall AIL_redbook_play(HREDBOOK hRedbook, unsigned int uStartMS, unsigned int uEndMS) |
162 DWORD __stdcall AIL_open_3D_provider(HPROVIDER a2) | 168 DWORD __stdcall AIL_open_3D_provider(HPROVIDER a2) |
163 { | 169 { |
164 return (mss32_AIL_open_3D_provider)(a2); | 170 return (mss32_AIL_open_3D_provider)(a2); |
165 } | 171 } |
166 | 172 |
167 int __stdcall AIL_3D_provider_attribute(HPROVIDER a1, const char *a2, int *a3) | 173 void __stdcall AIL_3D_provider_attribute(HPROVIDER lib, char *name, void *val) |
168 { | 174 { |
169 __asm int 3 | 175 //__asm int 3 |
170 return 0; | 176 //return 0; |
177 | |
178 (mss32_AIL_3D_provider_attribute)(lib,name,val); | |
171 } | 179 } |
172 | 180 |
173 // sub_4D8374: using guessed type int __stdcall AIL_redbook_tracks(_DWORD); | 181 // sub_4D8374: using guessed type int __stdcall AIL_redbook_tracks(_DWORD); |
174 unsigned int __stdcall AIL_redbook_tracks(HREDBOOK hRedbook) | 182 unsigned int __stdcall AIL_redbook_tracks(HREDBOOK hRedbook) |
175 { | 183 { |
198 int __stdcall AIL_get_preference(unsigned int number) | 206 int __stdcall AIL_get_preference(unsigned int number) |
199 { | 207 { |
200 return (mss32_AIL_get_preference)(number); | 208 return (mss32_AIL_get_preference)(number); |
201 } | 209 } |
202 | 210 |
203 int __stdcall AIL_waveOutClose(_DIG_DRIVER *) | 211 void __stdcall AIL_waveOutClose(HDIGDRIVER drvr) |
204 { | 212 { |
205 __asm int 3 | 213 //__asm int 3 |
206 return 0; | 214 //return 0; |
215 | |
216 (mss32_AIL_waveOutClose)(drvr); | |
207 } | 217 } |
208 | 218 |
209 // sub_4D8320: using guessed type int __stdcall AIL_redbook_pause(_DWORD); | 219 // sub_4D8320: using guessed type int __stdcall AIL_redbook_pause(_DWORD); |
210 unsigned int __stdcall AIL_redbook_pause(HREDBOOK hRedbook) | 220 unsigned int __stdcall AIL_redbook_pause(HREDBOOK hRedbook) |
211 { | 221 { |
234 { | 244 { |
235 __asm int 3 | 245 __asm int 3 |
236 return 0; | 246 return 0; |
237 } | 247 } |
238 | 248 |
239 int __stdcall AIL_release_sample_handle(void *a1) | 249 void __stdcall AIL_release_sample_handle(HSAMPLE s) |
240 { | 250 { |
241 //__asm int 3 | 251 //__asm int 3 |
242 return 0; | 252 //return 0; |
253 | |
254 (mss32_AIL_release_sample_handle)(s); | |
243 } | 255 } |
244 | 256 |
245 int __stdcall AIL_release_3D_sample_handle(void *a1) | 257 int __stdcall AIL_release_3D_sample_handle(void *a1) |
246 { | 258 { |
247 __asm int 3 | 259 __asm int 3 |