Rev 465 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 465 | Rev 520 | ||
---|---|---|---|
Line 13... | Line 13... | ||
13 | API_VERSION equ 0x01000100 |
13 | API_VERSION equ 0x01000100 |
14 | SOUND_VERSION equ API_VERSION |
14 | SOUND_VERSION equ API_VERSION |
Line 15... | Line 15... | ||
15 | 15 | ||
- | 16 | ||
- | 17 | include 'proc32.inc' |
|
16 | 18 | ||
- | 19 | ;include 'system.inc' |
|
17 | include 'proc32.inc' |
20 | include 'main.inc' |
Line 18... | Line 21... | ||
18 | include 'main.inc' |
21 | |
19 | include 'imports.inc' |
22 | include 'imports.inc' |
20 | 23 | ||
Line 25... | Line 28... | ||
25 | 28 | ||
Line 26... | Line 29... | ||
26 | DEBUG equ 1 |
29 | DEBUG equ 1 |
27 | - | ||
28 | - | ||
29 | OS_BASE equ 0x80000000 |
- | |
Line 30... | Line 30... | ||
30 | SLOT_BASE equ (OS_BASE+0x0080000) |
30 | |
31 | TASK_COUNT equ (OS_BASE+0x0003004) |
31 | |
Line 32... | Line 32... | ||
32 | CURRENT_TASK equ (OS_BASE+0x0003000) |
32 | OS_BASE equ 0x80000000 |
Line 332... | Line 332... | ||
332 | jmp .test_ok |
332 | jmp .test_ok |
333 | .test_ring: |
333 | .test_ring: |
334 | test eax, PCM_OUT+PCM_STATIC |
334 | test eax, PCM_OUT+PCM_STATIC |
335 | jnz .fail |
335 | jnz .fail |
336 | .test_ok: |
336 | .test_ok: |
337 | mov ebx, [CURRENT_TASK] ;hack: direct accsess |
- | |
- | 337 | ||
338 | shl ebx, 5 ;to kernel data |
338 | call GetPid |
339 | mov ebx, [CURRENT_TASK+ebx+4] |
339 | mov ebx, eax |
340 | mov eax, STREAM_SIZE |
340 | mov eax, STREAM_SIZE |
Line 341... | Line 341... | ||
341 | 341 | ||
342 | call CreateObject |
342 | call CreateObject |
343 | test eax, eax |
343 | test eax, eax |
Line 388... | Line 388... | ||
388 | mov [ring_size], ebx |
388 | mov [ring_size], ebx |
389 | mov eax, ebx |
389 | mov eax, ebx |
390 | shr ebx, 12 |
390 | shr ebx, 12 |
391 | mov [ring_pages], ebx |
391 | mov [ring_pages], ebx |
Line 392... | Line -... | ||
392 | - | ||
393 | add eax, eax ;double ring size |
392 | |
Line -... | Line 393... | ||
- | 393 | stdcall CreateRingBuffer, eax, PG_SW |
|
- | 394 | ||
- | 395 | if 0 |
|
394 | stdcall AllocKernelSpace, eax |
396 | stdcall AllocKernelSpace, eax |
395 | 397 | end if |
|
396 | mov edi, [str] |
398 | mov edi, [str] |
397 | mov ecx, [ring_size] |
399 | mov ecx, [ring_size] |
398 | mov [edi+STREAM.in_base], eax |
400 | mov [edi+STREAM.in_base], eax |
Line 405... | Line 407... | ||
405 | 407 | ||
406 | mov [edi+STREAM.in_free], ecx |
408 | mov [edi+STREAM.in_free], ecx |
407 | add eax, ecx |
409 | add eax, ecx |
Line -... | Line 410... | ||
- | 410 | mov [edi+STREAM.in_top], eax |
|
408 | mov [edi+STREAM.in_top], eax |
411 | |
409 | 412 | if 0 |
|
410 | mov ebx, [ring_pages] |
413 | mov ebx, [ring_pages] |
411 | stdcall AllocPages, ebx |
414 | stdcall AllocPages, ebx |
412 | mov edi, [str] |
415 | mov edi, [str] |
Line 419... | Line 422... | ||
419 | mov ecx, [ring_pages] |
422 | mov ecx, [ring_pages] |
420 | pop ebx |
423 | pop ebx |
421 | pop eax |
424 | pop eax |
422 | add ebx, [ring_size] |
425 | add ebx, [ring_size] |
423 | call CommitPages ;double mapped |
426 | call CommitPages ;double mapped |
424 | 427 | end if |
|
425 | jmp .out_buff |
428 | jmp .out_buff |
426 | .static: |
429 | .static: |
427 | mov ecx, [size] |
430 | mov ecx, [size] |
428 | add ecx, 128 ;resampler required |
431 | add ecx, 128 ;resampler required |
429 | mov [eax+STREAM.in_size], ecx |
432 | mov [eax+STREAM.in_size], ecx |