Rev 359 | Go to most recent revision | 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 |
||
14 | proc _SetBuffer@16 stdcall,str:dword, src:dword, offs:dword, size:dword |
||
15 | locals |
||
16 | handle dd ? |
||
17 | io_code dd ? |
||
18 | input dd ? |
||
19 | inp_size dd ? |
||
20 | output dd ? |
||
21 | out_size dd ? |
||
22 | endl |
||
23 | |||
24 | push ebx |
||
25 | push ecx |
||
26 | mov eax, [hSound] |
||
27 | lea ebx, [str] |
||
28 | xor ecx, ecx |
||
29 | |||
30 | mov [handle], eax |
||
31 | mov [io_code], SND_SETBUFF |
||
32 | mov [input], ebx |
||
33 | mov [inp_size], 16 |
||
34 | mov [output], ecx |
||
35 | mov [out_size], ecx |
||
36 | |||
37 | mov eax, 68 |
||
38 | mov ebx, 17 |
||
39 | lea ecx, [handle] |
||
40 | int 0x40 |
||
41 | pop ecx |
||
42 | pop ebx |
||
43 | ret |
||
44 | endp |
||
45 | |||
46 | align 4 |
||
374 | serge | 47 | proc _PlayBuffer@8 stdcall, str:dword,flags:dword |
359 | serge | 48 | locals |
49 | handle dd ? |
||
50 | io_code dd ? |
||
51 | input dd ? |
||
52 | inp_size dd ? |
||
53 | output dd ? |
||
54 | out_size dd ? |
||
55 | endl |
||
56 | |||
57 | push ebx |
||
58 | push ecx |
||
59 | mov eax, [hSound] |
||
60 | lea ebx, [str] |
||
61 | xor ecx, ecx |
||
62 | |||
63 | mov [handle], eax |
||
64 | mov [io_code], SND_PLAY |
||
65 | mov [input], ebx |
||
66 | mov [inp_size], 4 |
||
67 | mov [output], ecx |
||
68 | mov [out_size], ecx |
||
69 | |||
70 | mov eax, 68 |
||
71 | mov ebx, 17 |
||
72 | lea ecx, [handle] |
||
73 | int 0x40 |
||
74 | pop ecx |
||
75 | pop ebx |
||
76 | ret |
||
77 | endp |