Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
359 | serge | 1 | format MS COFF |
2 | |||
3 | include "snd.inc" |
||
4 | include "proc32.inc" |
||
5 | |||
6 | section '.text' align 16 code readable executable |
||
7 | |||
8 | public _GetMasterVol@4 |
||
9 | public _SetMasterVol@4 |
||
10 | |||
11 | extrn hrdwSound |
||
12 | |||
13 | align 4 |
||
14 | proc _GetMasterVol@4 stdcall, pvol:dword |
||
15 | locals |
||
16 | handle dd ? |
||
17 | io_code dd ? |
||
18 | input dd ? |
||
19 | inp_size dd ? |
||
20 | output dd ? |
||
21 | out_size dd ? |
||
22 | endl |
||
23 | |||
24 | push ebx |
||
25 | push ecx |
||
26 | mov eax, [hrdwSound] |
||
27 | mov ecx, [pvol] |
||
28 | xor ebx, ebx |
||
29 | mov [handle], eax |
||
30 | mov [io_code], DEV_GET_MASTERVOL |
||
31 | mov [input], ebx |
||
32 | mov [inp_size], ebx |
||
33 | mov [output], ecx |
||
34 | mov [out_size], 4 |
||
35 | |||
36 | mov eax, 68 |
||
37 | mov ebx, 17 |
||
38 | lea ecx, [handle] |
||
39 | int 0x40 |
||
40 | pop ecx |
||
41 | pop ebx |
||
42 | ret |
||
43 | endp |
||
44 | |||
45 | align 4 |
||
46 | proc _SetMasterVol@4 stdcall,vol:dword |
||
47 | locals |
||
48 | handle dd ? |
||
49 | io_code dd ? |
||
50 | input dd ? |
||
51 | inp_size dd ? |
||
52 | output dd ? |
||
53 | out_size dd ? |
||
54 | endl |
||
55 | |||
56 | push ebx |
||
57 | push ecx |
||
58 | mov eax, [hrdwSound] |
||
59 | lea ebx, [vol] |
||
60 | xor ecx, ecx |
||
61 | |||
62 | mov [handle], eax |
||
63 | mov [io_code], DEV_SET_MASTERVOL |
||
64 | mov [input], ebx |
||
65 | mov [inp_size], 4 |
||
66 | mov [output], ecx |
||
67 | mov [out_size], ecx |
||
68 | |||
69 | mov eax, 68 |
||
70 | mov ebx, 17 |
||
71 | lea ecx, [handle] |
||
72 | int 0x40 |
||
73 | pop ecx |
||
74 | pop ebx |
||
75 | ret |
||
76 | endp |
||
77 | |||
78 | if 0 |
||
79 | align 4 |
||
80 | proc _GetDevInfo@8 stdcall, hSrv:dword, p_info:dword |
||
81 | locals |
||
82 | handle dd ? |
||
83 | io_code dd ? |
||
84 | input dd ? |
||
85 | inp_size dd ? |
||
86 | output dd ? |
||
87 | out_size dd ? |
||
88 | endl |
||
89 | |||
90 | push ebx |
||
91 | mov eax, [hSrv] |
||
92 | xor ebx, ebx |
||
93 | mov ecx, [p_info] |
||
94 | |||
95 | mov [handle], eax |
||
96 | mov [io_code], DEV_GET_INFO |
||
97 | mov [input], ebx |
||
98 | mov [inp_size], ebx |
||
99 | mov [output], ecx |
||
100 | mov [out_size], CTRL_INFO_SIZE |
||
101 | |||
102 | lea eax, [handle] |
||
103 | stdcall CallServiceEx, eax |
||
104 | pop ebx |
||
105 | ret |
||
106 | endp |
||
107 | |||
108 | end if |