Subversion Repositories Kolibri OS

Rev

Rev 374 | Go to most recent revision | 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 _GetBufferPos@4
10
public _GetBufferPos@8
11
 
11
 
12
align 4
-
 
13
proc _GetBufferPos@4 stdcall, str:dword
-
 
14
           locals
-
 
15
             handle     dd ?
-
 
16
             io_code    dd ?
-
 
17
             input      dd ?
-
 
18
             inp_size   dd ?
-
 
19
             output     dd ?
-
 
20
             out_size   dd ?
12
align 4
21
           endl
13
_GetBufferPos@8:     ;str:dword, p_pos:dword
22
 
14
 
23
           push ebx
15
           push ebx
24
           push ecx
16
           push ecx
-
 
17
           
25
           mov eax, [hSound]
18
           lea eax, [esp+16]
26
           lea ebx, [str]
19
           lea ebx, [esp+12]   ;[stream]
27
           xor ecx, ecx
-
 
28
 
20
 
29
           mov [handle], eax
21
           push 4              ;.out_size
30
           mov [io_code], SND_GETPOS
22
           push eax            ;.output
31
           mov [input], ebx
23
           push 4              ;.inp_size
32
           mov [inp_size], 4
24
           push ebx            ;.input
33
           mov [output], ecx
25
           push SND_GETPOS     ;.code
34
           mov [out_size], ecx
26
           push dword [hSound] ;.handle
35
 
27
 
36
           mov eax, 68
28
           mov eax, 68
37
           mov ebx, 17
29
           mov ebx, 17
38
           lea ecx, [handle]
30
           mov ecx, esp
39
           int 0x40
31
           int 0x40
-
 
32
           add esp, 24
40
           pop ecx 
33
           pop ecx 
41
           pop ebx
34
           pop ebx
42
           ret
35
           ret 8
43
endp
36