Subversion Repositories Kolibri OS

Rev

Rev 376 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
374 serge 1
format MS COFF
2
 
3
include "snd.inc"
4
include "proc32.inc"
5
 
6
section '.text' align 16 code readable executable
7
 
376 serge 8
public _GetBufferSize@8
573 serge 9
public _GetBufferFree@8
374 serge 10
 
11
extrn hSound
12
 
13
align 4
376 serge 14
_GetBufferSize@8:      ;str:dword, p_size:dword
374 serge 15
 
16
           push ebx
17
           push ecx
376 serge 18
 
19
           lea eax, [esp+16]
20
           lea ebx, [esp+12]   ;[stream]
374 serge 21
 
376 serge 22
           push 4              ;.out_size
23
           push eax            ;.output
24
           push 4              ;.inp_size
25
           push ebx            ;.input
26
           push SND_GETBUFFSIZE;.code
27
           push dword [hSound] ;.handle
374 serge 28
 
29
           mov eax, 68
30
           mov ebx, 17
376 serge 31
           mov ecx, esp
374 serge 32
           int 0x40
376 serge 33
           add esp, 24
374 serge 34
           pop ecx
35
           pop ebx
376 serge 36
           ret 8
37
 
573 serge 38
align 4
39
_GetBufferFree@8:      ;str:dword, p_free:dword
40
           push ebx
41
           push ecx
42
 
43
           lea ebx, [esp+12]      ;[stream]
44
           push 0                 ;storage for free_space
45
           mov eax, esp
46
 
47
           push 4                 ;.out_size
48
           push eax               ;.output
49
           push 4                 ;.inp_size
50
           push ebx               ;.input
51
           push SND_GETFREESPACE  ;.code
52
           push dword [hSound]    ;.handle
53
 
54
           mov eax, 68
55
           mov ebx, 17
56
           mov ecx, esp
57
           int 0x40
58
           add esp, 24
59
           mov ecx, [esp+20]      ; p_free
60
           pop dword [ecx]
61
           pop ecx
62
           pop ebx
63
           ret 8