kolibrios/programs/develop/sdk/trunk/sound/src/setbuf.asm
Sergey Semyonov (Serge) 72fe949f6f DOOM alpha 4
git-svn-id: svn://kolibrios.org@374 a494cfbc-eb01-0410-851d-a64ba20cac60
2007-02-25 09:21:19 +00:00

78 lines
1.7 KiB
NASM

format MS COFF
include "snd.inc"
include "proc32.inc"
section '.text' align 16 code readable executable
extrn hSound
public _SetBuffer@16
public _PlayBuffer@8
align 4
proc _SetBuffer@16 stdcall,str:dword, src:dword, offs:dword, size:dword
locals
handle dd ?
io_code dd ?
input dd ?
inp_size dd ?
output dd ?
out_size dd ?
endl
push ebx
push ecx
mov eax, [hSound]
lea ebx, [str]
xor ecx, ecx
mov [handle], eax
mov [io_code], SND_SETBUFF
mov [input], ebx
mov [inp_size], 16
mov [output], ecx
mov [out_size], ecx
mov eax, 68
mov ebx, 17
lea ecx, [handle]
int 0x40
pop ecx
pop ebx
ret
endp
align 4
proc _PlayBuffer@8 stdcall, str:dword,flags:dword
locals
handle dd ?
io_code dd ?
input dd ?
inp_size dd ?
output dd ?
out_size dd ?
endl
push ebx
push ecx
mov eax, [hSound]
lea ebx, [str]
xor ecx, ecx
mov [handle], eax
mov [io_code], SND_PLAY
mov [input], ebx
mov [inp_size], 4
mov [output], ecx
mov [out_size], ecx
mov eax, 68
mov ebx, 17
lea ecx, [handle]
int 0x40
pop ecx
pop ebx
ret
endp