Rev 2991 | Rev 5273 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2991 | Rev 5077 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
2 | ;; ;; |
3 | ;; Copyright (C) KolibriOS team 2006-2011. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2006-2014. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 7... | Line 7... | ||
7 | 7 | ||
8 | ; Serge 2006-2008 |
8 | ; Serge 2006-2008 |
Line 9... | Line 9... | ||
9 | ; email: infinity_sound@mail.ru |
9 | ; email: infinity_sound@mail.ru |
- | 10 | ||
Line 10... | Line 11... | ||
10 | 11 | format PE DLL native 0.05 |
|
Line 11... | Line -... | ||
11 | format MS COFF |
- | |
12 | - | ||
13 | DEBUG equ 1 |
- | |
14 | - | ||
15 | - | ||
16 | include 'proc32.inc' |
12 | entry START |
17 | include 'main.inc' |
13 | |
Line 18... | Line 14... | ||
18 | include 'imports.inc' |
14 | DEBUG equ 1 |
19 | 15 | ||
Line 36... | Line 32... | ||
36 | OS_BASE equ 0x80000000 |
32 | OS_BASE equ 0x80000000 |
Line 37... | Line 33... | ||
37 | 33 | ||
38 | CAPS_SSE2 equ 26 |
34 | CAPS_SSE2 equ 26 |
Line 39... | Line -... | ||
39 | PG_SW equ 0x003 |
- | |
40 | - | ||
41 | public START |
- | |
42 | public service_proc |
- | |
43 | public version |
35 | PG_SW equ 0x003 |
44 | 36 | ||
45 | RT_INP_EMPTY equ 0xFF000001 |
37 | RT_INP_EMPTY equ 0xFF000001 |
46 | RT_OUT_EMPTY equ 0xFF000002 |
38 | RT_OUT_EMPTY equ 0xFF000002 |
Line 55... | Line 47... | ||
55 | DEV_PLAY equ 1 |
47 | DEV_PLAY equ 1 |
56 | DEV_STOP equ 2 |
48 | DEV_STOP equ 2 |
57 | DEV_CALLBACK equ 3 |
49 | DEV_CALLBACK equ 3 |
58 | DEV_GET_POS equ 9 |
50 | DEV_GET_POS equ 9 |
Line 59... | Line -... | ||
59 | - | ||
60 | struc IOCTL |
51 | |
61 | { .handle dd ? |
52 | section '.flat' code readable executable |
62 | .io_code dd ? |
53 | include '../../struct.inc' |
63 | .input dd ? |
54 | include '../../macros.inc' |
64 | .inp_size dd ? |
55 | include '../../proc32.inc' |
65 | .output dd ? |
56 | include 'main.inc' |
66 | .out_size dd ? |
- | |
67 | } |
57 | include '../../peimport.inc' |
68 | - | ||
69 | virtual at 0 |
- | |
70 | IOCTL IOCTL |
- | |
Line 71... | Line -... | ||
71 | end virtual |
- | |
Line 72... | Line 58... | ||
72 | 58 | ||
Line 73... | Line 59... | ||
73 | section '.flat' code readable align 16 |
59 | |
74 | 60 | ||
Line 75... | Line 61... | ||
75 | proc START stdcall, state:dword |
61 | proc START c uses ebx esi edi, state:dword, cmdline:dword |
76 | 62 | ||
77 | cmp [state], 1 |
63 | cmp [state], 1 |
78 | jne .exit |
64 | jne .exit |
Line 79... | Line 65... | ||
79 | 65 | ||
80 | stdcall GetService, szSound |
66 | invoke GetService, szSound |
81 | test eax, eax |
67 | test eax, eax |
82 | jz .fail |
68 | jz .fail |
Line 83... | Line 69... | ||
83 | mov [hSound], eax |
69 | mov [hSound], eax |
Line 131... | Line 117... | ||
131 | end if |
117 | end if |
Line 132... | Line 118... | ||
132 | 118 | ||
133 | end if |
119 | end if |
134 | stdcall set_handler, [hSound], new_mix |
120 | stdcall set_handler, [hSound], new_mix |
135 | mov [eng_state], SND_STOP |
121 | mov [eng_state], SND_STOP |
136 | stdcall RegService, szInfinity, service_proc |
122 | invoke RegService, szInfinity, service_proc |
137 | ret |
123 | ret |
138 | .fail: |
124 | .fail: |
139 | if DEBUG |
125 | if DEBUG |
140 | mov esi, msgFail |
126 | mov esi, msgFail |
141 | call SysMsgBoardStr |
127 | invoke SysMsgBoardStr |
142 | end if |
128 | end if |
143 | .exit: |
129 | .exit: |
144 | xor eax, eax |
130 | xor eax, eax |
Line 145... | Line 131... | ||
145 | ret |
131 | ret |
146 | 132 | ||
147 | .out_of_mem: |
133 | .out_of_mem: |
148 | if DEBUG |
134 | if DEBUG |
149 | mov esi, msgMem |
135 | mov esi, msgMem |
150 | call SysMsgBoardStr |
136 | invoke SysMsgBoardStr |
151 | end if |
137 | end if |
152 | xor eax, eax |
138 | xor eax, eax |
Line 153... | Line -... | ||
153 | ret |
- | |
154 | endp |
- | |
155 | - | ||
156 | handle equ IOCTL.handle |
- | |
157 | io_code equ IOCTL.io_code |
- | |
158 | input equ IOCTL.input |
- | |
159 | inp_size equ IOCTL.inp_size |
- | |
160 | output equ IOCTL.output |
- | |
161 | out_size equ IOCTL.out_size |
- | |
162 | 139 | ret |
|
Line 163... | Line 140... | ||
163 | 140 | endp |
|
164 | 141 | ||
165 | align 4 |
142 | align 4 |
Line 187... | Line 164... | ||
187 | srv_calls_end: |
164 | srv_calls_end: |
Line 188... | Line 165... | ||
188 | 165 | ||
Line 189... | Line 166... | ||
189 | proc service_proc stdcall, ioctl:dword |
166 | proc service_proc stdcall, ioctl:dword |
190 | 167 | ||
Line 191... | Line 168... | ||
191 | mov edi, [ioctl] |
168 | mov edi, [ioctl] |
192 | mov eax, [edi+io_code] |
169 | mov eax, [edi+IOCTL.io_code] |
Line 193... | Line 170... | ||
193 | 170 | ||
194 | cmp eax, (srv_calls_end-srv_calls)/4 |
171 | cmp eax, (srv_calls_end-srv_calls)/4 |
Line 195... | Line 172... | ||
195 | ja .fail |
172 | ja .fail |
196 | 173 | ||
Line 197... | Line 174... | ||
197 | cmp eax, SND_DESTROY_BUFF |
174 | cmp eax, SND_DESTROY_BUFF |
198 | jb @F |
175 | jb @F |
Line 199... | Line 176... | ||
199 | 176 | ||
200 | ; cmp [edi+inp_size], 4 |
177 | ; cmp [edi+inp_size], 4 |
Line 217... | Line 194... | ||
217 | mov eax, -1 |
194 | mov eax, -1 |
218 | ret |
195 | ret |
Line 219... | Line 196... | ||
219 | 196 | ||
220 | align 4 |
197 | align 4 |
221 | .srv_getversion: |
198 | .srv_getversion: |
222 | mov eax, [edi+output] |
199 | mov eax, [edi+IOCTL.output] |
223 | cmp [edi+out_size], 4 |
200 | cmp [edi+IOCTL.out_size], 4 |
224 | jne .fail |
201 | jne .fail |
225 | mov eax, [eax] |
202 | mov eax, [eax] |
226 | mov [eax], dword API_VERSION |
203 | mov [eax], dword API_VERSION |
227 | xor eax, eax |
204 | xor eax, eax |
Line 228... | Line 205... | ||
228 | ret |
205 | ret |
229 | 206 | ||
230 | align 4 |
207 | align 4 |
231 | .snd_create_buff: |
208 | .snd_create_buff: |
232 | mov ebx, [edi+input] |
209 | mov ebx, [edi+IOCTL.input] |
233 | stdcall CreateBuffer, [ebx], [ebx+4] |
210 | stdcall CreateBuffer, [ebx], [ebx+4] |
234 | mov edi, [ioctl] |
211 | mov edi, [ioctl] |
235 | mov ecx, [edi+output] |
212 | mov ecx, [edi+IOCTL.output] |
236 | mov ecx, [ecx] |
213 | mov ecx, [ecx] |
Line 237... | Line 214... | ||
237 | mov [ecx], ebx |
214 | mov [ecx], ebx |
Line 249... | Line 226... | ||
249 | ret |
226 | ret |
Line 250... | Line 227... | ||
250 | 227 | ||
251 | align 4 |
228 | align 4 |
252 | .snd_getformat: |
229 | .snd_getformat: |
253 | movzx eax, word [edx+STREAM.format] |
230 | movzx eax, word [edx+STREAM.format] |
254 | mov ecx, [edi+output] |
231 | mov ecx, [edi+IOCTL.output] |
255 | mov ecx, [ecx] |
232 | mov ecx, [ecx] |
256 | mov [ecx], eax |
233 | mov [ecx], eax |
257 | xor eax, eax |
234 | xor eax, eax |
Line 269... | Line 246... | ||
269 | 246 | ||
270 | align 4 |
247 | align 4 |
271 | .snd_getpos: |
248 | .snd_getpos: |
272 | stdcall GetBufferPos, edx |
249 | stdcall GetBufferPos, edx |
273 | mov edi, [ioctl] |
250 | mov edi, [ioctl] |
274 | mov ecx, [edi+output] |
251 | mov ecx, [edi+IOCTL.output] |
275 | mov ecx, [ecx] |
252 | mov ecx, [ecx] |
276 | mov [ecx], ebx |
253 | mov [ecx], ebx |
Line 277... | Line 254... | ||
277 | ret |
254 | ret |
Line 303... | Line 280... | ||
303 | stdcall SetBufferVol, edx, [ebx+4], [ebx+8] |
280 | stdcall SetBufferVol, edx, [ebx+4], [ebx+8] |
304 | ret |
281 | ret |
Line 305... | Line 282... | ||
305 | 282 | ||
306 | align 4 |
283 | align 4 |
307 | .snd_getvolume: |
284 | .snd_getvolume: |
308 | mov eax, [edi+output] |
285 | mov eax, [edi+IOCTL.output] |
309 | mov ecx, [eax] |
286 | mov ecx, [eax] |
310 | mov eax, [eax+4] |
287 | mov eax, [eax+4] |
311 | stdcall GetBufferVol, edx, ecx, eax |
288 | stdcall GetBufferVol, edx, ecx, eax |
312 | ret |
289 | ret |
Line 316... | Line 293... | ||
316 | ret |
293 | ret |
Line 317... | Line 294... | ||
317 | 294 | ||
318 | align 4 |
295 | align 4 |
319 | .snd_getpan: |
296 | .snd_getpan: |
320 | mov eax, [edx+STREAM.pan] |
297 | mov eax, [edx+STREAM.pan] |
321 | mov ebx, [edi+output] |
298 | mov ebx, [edi+IOCTL.output] |
322 | mov ebx, [ebx] |
299 | mov ebx, [ebx] |
323 | mov [ebx], eax |
300 | mov [ebx], eax |
324 | xor eax, eax |
301 | xor eax, eax |
Line 325... | Line 302... | ||
325 | ret |
302 | ret |
326 | 303 | ||
327 | align 4 |
304 | align 4 |
328 | .snd_getbuffsize: |
305 | .snd_getbuffsize: |
329 | mov eax, [edx+STREAM.in_size] |
306 | mov eax, [edx+STREAM.in_size] |
330 | mov ecx, [edi+output] |
307 | mov ecx, [edi+IOCTL.output] |
331 | mov ecx, [ecx] |
308 | mov ecx, [ecx] |
332 | mov [ecx], eax |
309 | mov [ecx], eax |
Line 337... | Line 314... | ||
337 | .snd_getfreespace: |
314 | .snd_getfreespace: |
338 | test [edx+STREAM.format], PCM_OUT |
315 | test [edx+STREAM.format], PCM_OUT |
339 | jz .fail |
316 | jz .fail |
Line 340... | Line 317... | ||
340 | 317 | ||
341 | mov ebx, [edx+STREAM.in_free] |
318 | mov ebx, [edx+STREAM.in_free] |
342 | mov ecx, [edi+output] |
319 | mov ecx, [edi+IOCTL.output] |
343 | mov [ecx], ebx |
320 | mov [ecx], ebx |
344 | xor eax, eax |
321 | xor eax, eax |
345 | ret |
322 | ret |
346 | align 4 |
323 | align 4 |
347 | .snd_settimebase: |
324 | .snd_settimebase: |
348 | cmp [edi+inp_size], 12 |
325 | cmp [edi+IOCTL.inp_size], 12 |
Line 349... | Line 326... | ||
349 | jne .fail |
326 | jne .fail |
350 | 327 | ||
Line 362... | Line 339... | ||
362 | 339 | ||
Line 363... | Line 340... | ||
363 | ret |
340 | ret |
364 | 341 | ||
365 | align 4 |
342 | align 4 |
366 | .snd_gettimestamp: |
343 | .snd_gettimestamp: |
Line 367... | Line 344... | ||
367 | cmp [edi+out_size], 8 |
344 | cmp [edi+IOCTL.out_size], 8 |
368 | jne .fail |
345 | jne .fail |
Line 391... | Line 368... | ||
391 | push ebx ;.input |
368 | push ebx ;.input |
392 | push DEV_GET_POS ;.code |
369 | push DEV_GET_POS ;.code |
393 | push dword [hSound] ;.handle |
370 | push dword [hSound] ;.handle |
394 | mov eax, esp |
371 | mov eax, esp |
Line 395... | Line 372... | ||
395 | 372 | ||
396 | stdcall ServiceHandler, eax |
373 | invoke ServiceHandler, eax |
Line 397... | Line 374... | ||
397 | add esp, 6*4 |
374 | add esp, 6*4 |
398 | 375 | ||
399 | pop edi |
376 | pop edi |
Line 405... | Line 382... | ||
405 | test eax, eax |
382 | test eax, eax |
406 | jz @F |
383 | jz @F |
Line 407... | Line 384... | ||
407 | 384 | ||
408 | mov dword [esp], 0 ; clear offset |
385 | mov dword [esp], 0 ; clear offset |
409 | @@: |
386 | @@: |
Line 410... | Line 387... | ||
410 | mov edi, [edi+output] |
387 | mov edi, [edi+IOCTL.output] |
411 | 388 | ||
412 | emms |
389 | emms |
413 | fild qword [edx+STREAM.time_stamp] |
390 | fild qword [edx+STREAM.time_stamp] |
Line 459... | Line 436... | ||
459 | .test_ring: |
436 | .test_ring: |
460 | test eax, PCM_OUT+PCM_STATIC |
437 | test eax, PCM_OUT+PCM_STATIC |
461 | jnz .fail |
438 | jnz .fail |
462 | .test_ok: |
439 | .test_ok: |
Line 463... | Line 440... | ||
463 | 440 | ||
464 | call GetPid |
441 | invoke GetPid |
465 | mov ebx, eax |
442 | mov ebx, eax |
Line 466... | Line 443... | ||
466 | mov eax, STREAM.sizeof |
443 | mov eax, STREAM.sizeof |
467 | 444 | ||
468 | call CreateObject |
445 | invoke CreateObject |
469 | test eax, eax |
446 | test eax, eax |
Line 470... | Line 447... | ||
470 | jz .fail |
447 | jz .fail |
Line 514... | Line 491... | ||
514 | mov [ring_size], ebx |
491 | mov [ring_size], ebx |
515 | mov eax, ebx |
492 | mov eax, ebx |
516 | shr ebx, 12 |
493 | shr ebx, 12 |
517 | mov [ring_pages], ebx |
494 | mov [ring_pages], ebx |
Line 518... | Line 495... | ||
518 | 495 | ||
Line 519... | Line 496... | ||
519 | stdcall CreateRingBuffer, eax, PG_SW |
496 | invoke CreateRingBuffer, eax, PG_SW |
520 | 497 | ||
521 | mov edi, [str] |
498 | mov edi, [str] |
522 | mov ecx, [ring_size] |
499 | mov ecx, [ring_size] |
Line 534... | Line 511... | ||
534 | jmp .out_buff |
511 | jmp .out_buff |
535 | .static: |
512 | .static: |
536 | mov ecx, [size] |
513 | mov ecx, [size] |
537 | add ecx, 128 ;resampler required |
514 | add ecx, 128 ;resampler required |
538 | mov [eax+STREAM.in_size], ecx |
515 | mov [eax+STREAM.in_size], ecx |
539 | stdcall KernelAlloc, ecx |
516 | invoke KernelAlloc, ecx |
Line 540... | Line 517... | ||
540 | 517 | ||
541 | mov edi, [str] |
518 | mov edi, [str] |
542 | mov [edi+STREAM.in_base], eax |
519 | mov [edi+STREAM.in_base], eax |
543 | add eax, 128 |
520 | add eax, 128 |
Line 548... | Line 525... | ||
548 | mov [edi+STREAM.in_free], ebx |
525 | mov [edi+STREAM.in_free], ebx |
549 | add eax, ebx |
526 | add eax, ebx |
550 | mov [edi+STREAM.in_top], eax |
527 | mov [edi+STREAM.in_top], eax |
Line 551... | Line 528... | ||
551 | 528 | ||
552 | .out_buff: |
529 | .out_buff: |
Line 553... | Line 530... | ||
553 | stdcall AllocKernelSpace, dword 128*1024 |
530 | invoke AllocKernelSpace, dword 128*1024 |
554 | 531 | ||
Line 555... | Line 532... | ||
555 | mov edi, [str] |
532 | mov edi, [str] |
Line 567... | Line 544... | ||
567 | 544 | ||
568 | mov dword [edi+STREAM.time_stamp], ebx |
545 | mov dword [edi+STREAM.time_stamp], ebx |
569 | mov dword [edi+STREAM.time_stamp+4], ebx |
546 | mov dword [edi+STREAM.time_stamp+4], ebx |
Line 570... | Line 547... | ||
570 | mov dword [edi+STREAM.last_ts], ebx |
547 | mov dword [edi+STREAM.last_ts], ebx |
571 | 548 | ||
572 | stdcall AllocPages, dword 64/4 |
549 | invoke AllocPages, dword 64/4 |
573 | mov edi, [str] |
550 | mov edi, [str] |
574 | mov ebx, [edi+STREAM.out_base] |
551 | mov ebx, [edi+STREAM.out_base] |
575 | mov ecx, 16 |
552 | mov ecx, 16 |
576 | or eax, PG_SW |
553 | or eax, PG_SW |
577 | push eax |
554 | push eax |
578 | push ebx |
555 | push ebx |
579 | call CommitPages ;eax, ebx, ecx |
556 | invoke CommitPages ;eax, ebx, ecx |
580 | mov ecx, 16 |
557 | mov ecx, 16 |
581 | pop ebx |
558 | pop ebx |
582 | pop eax |
559 | pop eax |
Line 583... | Line 560... | ||
583 | add ebx, 64*1024 |
560 | add ebx, 64*1024 |
584 | call CommitPages ;double mapped |
561 | invoke CommitPages ;double mapped |
585 | 562 | ||
586 | mov edi, [str] |
563 | mov edi, [str] |
Line 597... | Line 574... | ||
597 | mov ecx, (64*1024)/4 |
574 | mov ecx, (64*1024)/4 |
598 | rep stosd |
575 | rep stosd |
Line 599... | Line 576... | ||
599 | 576 | ||
600 | xor esi, esi |
577 | xor esi, esi |
601 | mov ecx, MANUAL_DESTROY |
578 | mov ecx, MANUAL_DESTROY |
Line 602... | Line 579... | ||
602 | call CreateEvent |
579 | invoke CreateEvent |
603 | 580 | ||
604 | mov ebx, [str] |
581 | mov ebx, [str] |
Line 645... | Line 622... | ||
645 | mov ecx, [eax+STREAM.str_bk] |
622 | mov ecx, [eax+STREAM.str_bk] |
646 | mov [ebx+STREAM.str_bk], ecx |
623 | mov [ebx+STREAM.str_bk], ecx |
647 | mov [ecx+STREAM.str_fd], ebx |
624 | mov [ecx+STREAM.str_fd], ebx |
648 | popf |
625 | popf |
Line 649... | Line 626... | ||
649 | 626 | ||
650 | stdcall KernelFree, [eax+STREAM.in_base] |
627 | invoke KernelFree, [eax+STREAM.in_base] |
651 | mov eax, [.handle] |
628 | mov eax, [.handle] |
Line 652... | Line 629... | ||
652 | stdcall KernelFree, [eax+STREAM.out_base] |
629 | invoke KernelFree, [eax+STREAM.out_base] |
653 | 630 | ||
654 | pop eax ;restore stack |
631 | pop eax ;restore stack |
655 | call DestroyObject ;eax= stream |
632 | invoke DestroyObject ;eax= stream |
656 | xor eax, eax |
633 | xor eax, eax |
657 | ret |
634 | ret |
658 | .fail: |
635 | .fail: |
Line 831... | Line 808... | ||
831 | 808 | ||
832 | cmp [state_saved], 0 |
809 | cmp [state_saved], 0 |
833 | jne @F |
810 | jne @F |
834 | lea eax, [fpu_state+15] |
811 | lea eax, [fpu_state+15] |
835 | and eax, -16 |
812 | and eax, -16 |
836 | call FpuSave |
813 | invoke FpuSave |
837 | mov [state_saved], 1 |
814 | mov [state_saved], 1 |
838 | @@: |
815 | @@: |
Line 839... | Line 816... | ||
839 | stdcall refill, edx |
816 | stdcall refill, edx |
Line 851... | Line 828... | ||
851 | .wait: |
828 | .wait: |
852 | sti |
829 | sti |
853 | mov edx, [str] |
830 | mov edx, [str] |
854 | mov eax, [edx+STREAM.notify_event] |
831 | mov eax, [edx+STREAM.notify_event] |
855 | mov ebx, [edx+STREAM.notify_id] |
832 | mov ebx, [edx+STREAM.notify_id] |
856 | call WaitEvent ;eax ebx |
833 | invoke WaitEvent ;eax ebx |
857 | jmp .main_loop |
834 | jmp .main_loop |
858 | .done: |
835 | .done: |
859 | cmp [state_saved], 1 |
836 | cmp [state_saved], 1 |
860 | jne @F |
837 | jne @F |
Line 861... | Line 838... | ||
861 | 838 | ||
862 | lea eax, [fpu_state+15] |
839 | lea eax, [fpu_state+15] |
863 | and eax, -16 |
840 | and eax, -16 |
864 | call FpuRestore |
841 | invoke FpuRestore |
865 | @@: |
842 | @@: |
866 | xor eax, eax |
843 | xor eax, eax |
867 | ret |
844 | ret |
868 | .fail: |
845 | .fail: |
Line 1154... | Line 1131... | ||
1154 | 1131 | ||
1155 | mov edx, [str] |
1132 | mov edx, [str] |
1156 | .wait: |
1133 | .wait: |
1157 | mov eax, [edx+STREAM.notify_event] |
1134 | mov eax, [edx+STREAM.notify_event] |
1158 | mov ebx, [edx+STREAM.notify_id] |
1135 | mov ebx, [edx+STREAM.notify_id] |
Line 1159... | Line 1136... | ||
1159 | call WaitEvent ;eax ebx |
1136 | invoke WaitEvent ;eax ebx |
1160 | 1137 | ||
1161 | mov edx, [str] |
1138 | mov edx, [str] |
1162 | cmp [edx+STREAM.flags], SND_STOP |
1139 | cmp [edx+STREAM.flags], SND_STOP |
Line 1180... | Line 1157... | ||
1180 | 1157 | ||
Line 1181... | Line 1158... | ||
1181 | mov [edx+STREAM.flags], SND_STOP |
1158 | mov [edx+STREAM.flags], SND_STOP |
1182 | 1159 | ||
1183 | mov eax, [edx+STREAM.notify_event] |
1160 | mov eax, [edx+STREAM.notify_event] |
Line 1184... | Line 1161... | ||
1184 | mov ebx, [edx+STREAM.notify_id] |
1161 | mov ebx, [edx+STREAM.notify_id] |
1185 | call ClearEvent ;eax ebx |
1162 | invoke ClearEvent ;eax ebx |
1186 | 1163 | ||
1187 | xor eax, eax |
1164 | xor eax, eax |
Line 1313... | Line 1290... | ||
1313 | mov [inp_size], 4 |
1290 | mov [inp_size], 4 |
1314 | mov [output], ebx |
1291 | mov [output], ebx |
1315 | mov [out_size], 0 |
1292 | mov [out_size], 0 |
Line 1316... | Line 1293... | ||
1316 | 1293 | ||
1317 | lea eax, [handler] |
1294 | lea eax, [handler] |
1318 | stdcall ServiceHandler, eax |
1295 | invoke ServiceHandler, eax |
1319 | ret |
1296 | ret |
Line 1320... | Line 1297... | ||
1320 | endp |
1297 | endp |
1321 | 1298 | ||
Line 1340... | Line 1317... | ||
1340 | mov [inp_size], ebx |
1317 | mov [inp_size], ebx |
1341 | mov [output], ebx |
1318 | mov [output], ebx |
1342 | mov [out_size], ebx |
1319 | mov [out_size], ebx |
Line 1343... | Line 1320... | ||
1343 | 1320 | ||
1344 | lea eax, [handle] |
1321 | lea eax, [handle] |
1345 | stdcall ServiceHandler, eax |
1322 | invoke ServiceHandler, eax |
1346 | ret |
1323 | ret |
Line 1347... | Line 1324... | ||
1347 | endp |
1324 | endp |
1348 | 1325 | ||
Line 1439... | Line 1416... | ||
1439 | vol_max dd 0x00000000,0x00000000 |
1416 | vol_max dd 0x00000000,0x00000000 |
1440 | vol_min dd 0x0000D8F0,0x0000D8F0 |
1417 | vol_min dd 0x0000D8F0,0x0000D8F0 |
1441 | pan_max dd 0x00002710,0x00002710 |
1418 | pan_max dd 0x00002710,0x00002710 |
Line 1442... | Line 1419... | ||
1442 | 1419 | ||
1443 | ;stream_map dd 0xFFFF ; 16 |
- | |
Line 1444... | Line 1420... | ||
1444 | version dd (5 shl 16) or SOUND_VERSION |
1420 | ;stream_map dd 0xFFFF ; 16 |
1445 | 1421 | ||
Line 1446... | Line 1422... | ||
1446 | szInfinity db 'INFINITY',0 |
1422 | szInfinity db 'INFINITY',0 |
Line 1455... | Line 1431... | ||
1455 | msgDestroy db 'Destroy sound buffer', 13,10,0 |
1431 | msgDestroy db 'Destroy sound buffer', 13,10,0 |
1456 | msgWaveout db 'Play waveout', 13,10,0 |
1432 | msgWaveout db 'Play waveout', 13,10,0 |
1457 | msgSetVolume db 'Set volume',13,10,0 |
1433 | msgSetVolume db 'Set volume',13,10,0 |
1458 | end if |
1434 | end if |
Line -... | Line 1435... | ||
- | 1435 | ||
- | 1436 | align 4 |
|
- | 1437 | data fixups |
|
- | 1438 | end data |
|
1459 | 1439 | ||
Line 1460... | Line 1440... | ||
1460 | section '.data' data readable writable align 16 |
1440 | section '.data' data readable writable |
1461 | 1441 | ||
1462 | play_list rd 16 |
1442 | play_list rd 16 |
1463 | mix_input rd 16 |
1443 | mix_input rd 16 |