From ac3deada1666d27ebdf7ec48d11691c91b6a2811 Mon Sep 17 00:00:00 2001 From: "Sergey Semyonov (Serge)" Date: Mon, 13 Jan 2014 14:52:57 +0000 Subject: [PATCH] sound.lib:missing file git-svn-id: svn://kolibrios.org@4445 a494cfbc-eb01-0410-851d-a64ba20cac60 --- .../develop/sdk/trunk/sound/src/sndtime.asm | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 programs/develop/sdk/trunk/sound/src/sndtime.asm diff --git a/programs/develop/sdk/trunk/sound/src/sndtime.asm b/programs/develop/sdk/trunk/sound/src/sndtime.asm new file mode 100644 index 0000000000..94393c2402 --- /dev/null +++ b/programs/develop/sdk/trunk/sound/src/sndtime.asm @@ -0,0 +1,90 @@ +format MS COFF + +include "snd.inc" +include "proc32.inc" + +section '.text' align 16 code readable executable + +public _SetTimeBase@12 +public _GetTimeStamp@8 +public _GetDevTime@4 + +extrn hSound +extrn hrdwSound + +align 4 +_SetTimeBase@12: ;stdcall str:dword, timebase:qword + + push ebx + push ecx + + xor eax, eax + lea ebx, [esp+12] ;[stream] + + push eax ;.out_size + push eax ;.output + push 12 ;.inp_size + push ebx ;.input + push SND_SETTIMEBASE ;.code + push dword [hSound] ;.handle + + mov eax, 68 + mov ebx, 17 + mov ecx, esp + int 0x40 + add esp, 24 + pop ecx + pop ebx + ret 12 + +align 4 +_GetTimeStamp@8: ; stdcall, str:dword, pstamp:dword + + push ebx + push ecx + + lea ebx, [esp+12] ;[stream] + mov eax, [esp+16] ;[pstamp] + + push 8 ;.out_size + push eax ;.output + push 4 ;.inp_size + push ebx ;.input + push SND_GETTIMESTAMP ;.code + push dword [hSound] ;.handle + + mov eax, 68 + mov ebx, 17 + mov ecx, esp + int 0x40 + add esp, 24 + pop ecx + pop ebx + ret 8 + +align 4 +_GetDevTime@4: ; pstamp:dword + + push ebx + push ecx + + xor ebx, ebx + mov eax, [esp+12] ;[pstamp] + + push 4 ;.out_size + push eax ;.output + push ebx ;.inp_size + push ebx ;.input + push 9 ;.code + push dword [hrdwSound] ;.handle + + mov eax, 68 + mov ebx, 17 + mov ecx, esp + int 0x40 + add esp, 24 + pop ecx + pop ebx + ret 4 + +