2007-02-22 07:40:13 +01:00
|
|
|
format MS COFF
|
|
|
|
|
|
|
|
include "snd.inc"
|
|
|
|
include "proc32.inc"
|
|
|
|
|
|
|
|
section '.text' align 16 code readable executable
|
|
|
|
|
2007-02-26 13:12:22 +01:00
|
|
|
public _GetBufferSize@8
|
2007-07-09 03:04:33 +02:00
|
|
|
public _GetBufferFree@8
|
2007-02-22 07:40:13 +01:00
|
|
|
|
2007-02-25 10:21:19 +01:00
|
|
|
extrn hSound
|
2007-02-22 07:40:13 +01:00
|
|
|
|
|
|
|
align 4
|
2007-02-26 13:12:22 +01:00
|
|
|
_GetBufferSize@8: ;str:dword, p_size:dword
|
2007-02-25 10:21:19 +01:00
|
|
|
|
2007-02-22 07:40:13 +01:00
|
|
|
push ebx
|
|
|
|
push ecx
|
2007-02-26 13:12:22 +01:00
|
|
|
|
|
|
|
lea eax, [esp+16]
|
|
|
|
lea ebx, [esp+12] ;[stream]
|
2007-02-22 07:40:13 +01:00
|
|
|
|
2007-02-26 13:12:22 +01:00
|
|
|
push 4 ;.out_size
|
|
|
|
push eax ;.output
|
|
|
|
push 4 ;.inp_size
|
|
|
|
push ebx ;.input
|
|
|
|
push SND_GETBUFFSIZE;.code
|
|
|
|
push dword [hSound] ;.handle
|
2007-02-22 07:40:13 +01:00
|
|
|
|
|
|
|
mov eax, 68
|
|
|
|
mov ebx, 17
|
2007-02-26 13:12:22 +01:00
|
|
|
mov ecx, esp
|
2007-02-22 07:40:13 +01:00
|
|
|
int 0x40
|
2007-02-26 13:12:22 +01:00
|
|
|
add esp, 24
|
2007-02-22 07:40:13 +01:00
|
|
|
pop ecx
|
|
|
|
pop ebx
|
2007-02-26 13:12:22 +01:00
|
|
|
ret 8
|
|
|
|
|
2007-07-09 03:04:33 +02:00
|
|
|
align 4
|
|
|
|
_GetBufferFree@8: ;str:dword, p_free:dword
|
|
|
|
push ebx
|
|
|
|
push ecx
|
|
|
|
|
|
|
|
lea ebx, [esp+12] ;[stream]
|
|
|
|
push 0 ;storage for free_space
|
|
|
|
mov eax, esp
|
|
|
|
|
|
|
|
push 4 ;.out_size
|
|
|
|
push eax ;.output
|
|
|
|
push 4 ;.inp_size
|
|
|
|
push ebx ;.input
|
|
|
|
push SND_GETFREESPACE ;.code
|
|
|
|
push dword [hSound] ;.handle
|
|
|
|
|
|
|
|
mov eax, 68
|
|
|
|
mov ebx, 17
|
|
|
|
mov ecx, esp
|
|
|
|
int 0x40
|
|
|
|
add esp, 24
|
|
|
|
mov ecx, [esp+20] ; p_free
|
|
|
|
pop dword [ecx]
|
|
|
|
pop ecx
|
|
|
|
pop ebx
|
|
|
|
ret 8
|