Subversion Repositories Kolibri OS

Rev

Rev 374 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 374 Rev 376
1
format MS COFF
1
format MS COFF
2
 
2
 
3
include "snd.inc"
3
include "snd.inc"
4
include "proc32.inc"
4
include "proc32.inc"
5
 
5
 
6
section '.text' align 16 code readable executable
6
section '.text' align 16 code readable executable
7
 
7
 
8
extrn hSound      
8
extrn hSound      
9
 
9
 
10
public _SetBuffer@16
10
public _SetBuffer@16
11
public _PlayBuffer@8
11
public _PlayBuffer@8
12
 
12
 
13
align 4
13
align 4
14
proc _SetBuffer@16 stdcall,str:dword, src:dword, offs:dword, size:dword
14
_SetBuffer@16:   ;str:dword, src:dword, offs:dword, size: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
 
15
 
24
           push ebx
16
           push ebx
25
           push ecx
17
           push ecx
-
 
18
           
26
           mov eax, [hSound]
19
           xor eax, eax
27
           lea ebx, [str]
20
           lea ebx, [esp+12]   ;[stream]
28
           xor ecx, ecx
-
 
29
 
21
 
30
           mov [handle], eax
22
           push eax            ;.out_size
31
           mov [io_code], SND_SETBUFF
23
           push eax            ;.output
32
           mov [input], ebx
24
           push 16             ;.inp_size
33
           mov [inp_size], 16
25
           push ebx            ;.input
34
           mov [output], ecx
26
           push SND_SETBUFF    ;.code
35
           mov [out_size], ecx
27
           push dword [hSound] ;.handle
36
 
28
 
37
           mov eax, 68
29
           mov eax, 68
38
           mov ebx, 17
30
           mov ebx, 17
39
           lea ecx, [handle]
31
           mov ecx, esp
40
           int 0x40
32
           int 0x40
-
 
33
           add esp, 24
41
           pop ecx 
34
           pop ecx 
42
           pop ebx
35
           pop ebx
43
           ret
36
           ret 16
44
endp
-
 
45
 
37
           
46
align 4
38
align 4
47
proc _PlayBuffer@8 stdcall, str:dword,flags:dword
-
 
48
           locals
-
 
49
             handle     dd ?
-
 
50
             io_code    dd ?
-
 
51
             input      dd ?
-
 
52
             inp_size   dd ?
-
 
53
             output     dd ?
-
 
54
             out_size   dd ?
-
 
55
           endl
39
_PlayBuffer@8:          ;str:dword,flags:dword
56
 
40
 
57
           push ebx
41
           push ebx
58
           push ecx
42
           push ecx
-
 
43
 
59
           mov eax, [hSound]
44
           xor eax, eax
60
           lea ebx, [str]
45
           lea ebx, [esp+12]   ;[stream]
61
           xor ecx, ecx
-
 
62
 
46
 
63
           mov [handle], eax
47
           push eax            ;.out_size
64
           mov [io_code], SND_PLAY
48
           push eax            ;.output
65
           mov [input], ebx
49
           push 8              ;.inp_size
66
           mov [inp_size], 4
50
           push ebx            ;.input
67
           mov [output], ecx
51
           push SND_PLAY       ;.code
68
           mov [out_size], ecx
52
           push dword [hSound] ;.handle
69
 
53
 
70
           mov eax, 68
54
           mov eax, 68
71
           mov ebx, 17
55
           mov ebx, 17
72
           lea ecx, [handle]
56
           mov ecx, esp
73
           int 0x40
57
           int 0x40
-
 
58
           add esp, 24
74
           pop ecx 
59
           pop ecx 
75
           pop ebx
60
           pop ebx
76
           ret
61
           ret 8
77
endp
62