Subversion Repositories Kolibri OS

Rev

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

Rev 359 Rev 368
Line 3... Line 3...
3
include "snd.inc"
3
include "snd.inc"
4
include "proc32.inc"
4
include "proc32.inc"
Line 5... Line 5...
5
 
5
 
Line -... Line 6...
-
 
6
section '.text' align 16 code readable executable
-
 
7
 
-
 
8
public _SetVolume@12
6
section '.text' align 16 code readable executable
9
public _GetVolume@12
7
 
10
 
Line -... Line 11...
-
 
11
public _GetMasterVol@4
8
public _GetMasterVol@4
12
public _SetMasterVol@4
Line 9... Line 13...
9
public _SetMasterVol@4
13
 
-
 
14
extrn hSound
-
 
15
extrn hrdwSound   
-
 
16
 
-
 
17
align 4
-
 
18
proc _SetVolume@12 stdcall, str:dword, lvol:dword,rvol:dword
-
 
19
           locals
-
 
20
             handle     dd ?
-
 
21
             io_code    dd ?
-
 
22
             input      dd ?
-
 
23
             inp_size   dd ?
-
 
24
             output     dd ?
-
 
25
             out_size   dd ?
-
 
26
           endl
-
 
27
           
-
 
28
           push ebx
-
 
29
           push ecx
-
 
30
           mov eax, [hSound]
-
 
31
           lea ebx, [str]
-
 
32
           xor ecx, ecx
-
 
33
 
-
 
34
           mov [handle], eax
-
 
35
           mov [io_code], SND_SETVOLUME
-
 
36
           mov [input], ebx
-
 
37
           mov [inp_size], 12
-
 
38
           mov [output], ecx
-
 
39
           mov [out_size], ecx
-
 
40
 
-
 
41
           mov eax, 68
-
 
42
           mov ebx, 17
-
 
43
           lea ecx, [handle]
-
 
44
           int 0x40
-
 
45
           pop ecx 
-
 
46
           pop ebx
-
 
47
           ret
-
 
48
endp
-
 
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
10
 
79
           ret
11
extrn hrdwSound   
80
endp
12
 
81
 
13
align 4
82
align 4
14
proc _GetMasterVol@4 stdcall, pvol:dword
83
proc _GetMasterVol@4 stdcall, pvol:dword