Subversion Repositories Kolibri OS

Rev

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

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