Subversion Repositories Kolibri OS

Rev

Rev 368 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 368 Rev 374
Line 4... Line 4...
4
include "proc32.inc"
4
include "proc32.inc"
Line 5... Line 5...
5
 
5
 
Line 6... Line 6...
6
section '.text' align 16 code readable executable
6
section '.text' align 16 code readable executable
7
 
-
 
8
public _SetVolume@12
-
 
9
public _GetVolume@12
-
 
10
 
-
 
Line 11... Line 7...
11
public _GetMasterVol@4
7
 
12
public _SetMasterVol@4
-
 
Line 13... Line 8...
13
 
8
public _SetVolume@12
14
extrn hSound
9
 
15
extrn hrdwSound   
10
extrn hSound
16
 
11
 
Line 45... Line 40...
45
           pop ecx 
40
           pop ecx 
46
           pop ebx
41
           pop ebx
47
           ret
42
           ret
48
endp
43
endp
Line 49... Line -...
49
 
-
 
50
align 4
-
 
51
proc _GetVolume@12 stdcall, str:dword, pleft:dword,pright:dword
-
 
52
           locals
-
 
53
             handle     dd ?
-
 
54
             io_code    dd ?
-
 
55
             input      dd ?
-
 
56
             inp_size   dd ?
-
 
57
             output     dd ?
-
 
58
             out_size   dd ?
-
 
59
           endl
-
 
60
           
-
 
61
           push ebx
-
 
62
           push ecx
-
 
63
           mov eax, [hSound]
-
 
64
           lea ebx, [str]
-
 
65
           lea ecx, [pleft]
-
 
66
           mov [handle], eax
-
 
67
           mov [io_code], SND_GETVOLUME
-
 
68
           mov [input], ebx
-
 
69
           mov [inp_size], 4
-
 
70
           mov [output], ecx
-
 
71
           mov [out_size], 8
-
 
72
 
-
 
73
           mov eax, 68
-
 
74
           mov ebx, 17
-
 
75
           lea ecx, [handle]
-
 
76
           int 0x40
-
 
77
           pop ecx 
-
 
78
           pop ebx
-
 
79
           ret
-
 
80
endp
-
 
81
 
-
 
82
align 4
-
 
83
proc _GetMasterVol@4 stdcall, pvol:dword
-
 
84
           locals
-
 
85
             handle     dd ?
-
 
86
             io_code    dd ?
-
 
87
             input      dd ?
-
 
88
             inp_size   dd ?
-
 
89
             output     dd ?
-
 
90
             out_size   dd ?
-
 
91
           endl
-
 
92
           
-
 
93
           push ebx
-
 
94
           push ecx
-
 
95
           mov eax, [hrdwSound]
-
 
96
           mov ecx, [pvol]
-
 
97
           xor ebx, ebx
-
 
98
           mov [handle], eax
-
 
99
           mov [io_code], DEV_GET_MASTERVOL
-
 
100
           mov [input], ebx
-
 
101
           mov [inp_size], ebx
-
 
102
           mov [output], ecx
-
 
103
           mov [out_size], 4
-
 
104
 
-
 
105
           mov eax, 68
-
 
106
           mov ebx, 17
-
 
107
           lea ecx, [handle]
-
 
108
           int 0x40
-
 
109
           pop ecx 
-
 
110
           pop ebx
-
 
111
           ret
-
 
112
endp
-
 
113
 
-
 
114
align 4
-
 
115
proc _SetMasterVol@4 stdcall,vol:dword
-
 
116
           locals
-
 
117
             handle     dd ?
-
 
118
             io_code    dd ?
-
 
119
             input      dd ?
-
 
120
             inp_size   dd ?
-
 
121
             output     dd ?
-
 
122
             out_size   dd ?
-
 
123
           endl
-
 
124
           
-
 
125
           push ebx
-
 
126
           push ecx
-
 
127
           mov eax, [hrdwSound]
-
 
128
           lea ebx, [vol]
-
 
129
           xor ecx, ecx
-
 
130
 
-
 
131
           mov [handle], eax
-
 
132
           mov [io_code], DEV_SET_MASTERVOL
-
 
133
           mov [input], ebx
-
 
134
           mov [inp_size], 4
-
 
135
           mov [output], ecx
-
 
136
           mov [out_size], ecx
-
 
137
 
-
 
138
           mov eax, 68
-
 
139
           mov ebx, 17
-
 
140
           lea ecx, [handle]
-
 
141
           int 0x40
-
 
142
           pop ecx 
-
 
143
           pop ebx
-
 
144
           ret
-
 
145
endp
-
 
146
 
-
 
147
if 0
-
 
148
align 4
-
 
149
proc _GetDevInfo@8 stdcall, hSrv:dword, p_info:dword
-
 
150
           locals
-
 
151
             handle     dd ?
-
 
152
             io_code    dd ?
-
 
153
             input      dd ?
-
 
154
             inp_size   dd ?
-
 
155
             output     dd ?
-
 
156
             out_size   dd ?
-
 
157
           endl
-
 
158
           
-
 
159
           push ebx
-
 
160
           mov eax, [hSrv]
-
 
161
           xor ebx, ebx
-
 
162
           mov ecx, [p_info]
-
 
163
 
-
 
164
           mov [handle], eax
-
 
165
           mov [io_code], DEV_GET_INFO
-
 
166
           mov [input], ebx
-
 
167
           mov [inp_size], ebx
-
 
168
           mov [output], ecx
-
 
169
           mov [out_size], CTRL_INFO_SIZE
-
 
170
 
-
 
171
           lea eax, [handle]
-
 
172
           stdcall CallServiceEx, eax
-
 
173
           pop ebx
-
 
174
           ret
-
 
175
endp
-
 
176
 
-
 
177
end if
44