2007-02-19 06:35:21 +01:00
|
|
|
format MS COFF
|
|
|
|
|
|
|
|
include "snd.inc"
|
|
|
|
include "proc32.inc"
|
|
|
|
|
|
|
|
section '.text' align 16 code readable executable
|
|
|
|
|
|
|
|
extrn hSound
|
|
|
|
|
|
|
|
public _SetBuffer@16
|
2007-02-25 10:21:19 +01:00
|
|
|
public _PlayBuffer@8
|
2007-02-19 06:35:21 +01:00
|
|
|
|
|
|
|
align 4
|
2007-02-26 13:12:22 +01:00
|
|
|
_SetBuffer@16: ;str:dword, src:dword, offs:dword, size:dword
|
2007-02-19 06:35:21 +01:00
|
|
|
|
|
|
|
push ebx
|
|
|
|
push ecx
|
2007-02-26 13:12:22 +01:00
|
|
|
|
|
|
|
xor eax, eax
|
|
|
|
lea ebx, [esp+12] ;[stream]
|
2007-02-19 06:35:21 +01:00
|
|
|
|
2007-02-26 13:12:22 +01:00
|
|
|
push eax ;.out_size
|
|
|
|
push eax ;.output
|
|
|
|
push 16 ;.inp_size
|
|
|
|
push ebx ;.input
|
|
|
|
push SND_SETBUFF ;.code
|
|
|
|
push dword [hSound] ;.handle
|
2007-02-19 06:35:21 +01:00
|
|
|
|
|
|
|
mov eax, 68
|
|
|
|
mov ebx, 17
|
2007-02-26 13:12:22 +01:00
|
|
|
mov ecx, esp
|
2007-02-19 06:35:21 +01:00
|
|
|
int 0x40
|
2007-02-26 13:12:22 +01:00
|
|
|
add esp, 24
|
2007-02-19 06:35:21 +01:00
|
|
|
pop ecx
|
|
|
|
pop ebx
|
2007-02-26 13:12:22 +01:00
|
|
|
ret 16
|
|
|
|
|
2007-02-19 06:35:21 +01:00
|
|
|
align 4
|
2007-02-26 13:12:22 +01:00
|
|
|
_PlayBuffer@8: ;str:dword,flags:dword
|
2007-02-19 06:35:21 +01:00
|
|
|
|
|
|
|
push ebx
|
|
|
|
push ecx
|
|
|
|
|
2007-02-26 13:12:22 +01:00
|
|
|
xor eax, eax
|
|
|
|
lea ebx, [esp+12] ;[stream]
|
|
|
|
|
|
|
|
push eax ;.out_size
|
|
|
|
push eax ;.output
|
|
|
|
push 8 ;.inp_size
|
|
|
|
push ebx ;.input
|
|
|
|
push SND_PLAY ;.code
|
|
|
|
push dword [hSound] ;.handle
|
2007-02-19 06:35:21 +01:00
|
|
|
|
|
|
|
mov eax, 68
|
|
|
|
mov ebx, 17
|
2007-02-26 13:12:22 +01:00
|
|
|
mov ecx, esp
|
2007-02-19 06:35:21 +01:00
|
|
|
int 0x40
|
2007-02-26 13:12:22 +01:00
|
|
|
add esp, 24
|
2007-02-19 06:35:21 +01:00
|
|
|
pop ecx
|
|
|
|
pop ebx
|
2007-02-26 13:12:22 +01:00
|
|
|
ret 8
|
|
|
|
|