source: trunk/src/dsound/os2helper.cpp@ 2912

Last change on this file since 2912 was 2637, checked in by hugh, 26 years ago

some minor dsound fixes

File size: 991 bytes
Line 
1#define INCL_DOSMISC
2#define INCL_DOSPROFILE
3#include <os2wrap.h>
4#include <misc.h>
5#include "asmutil.h"
6
7typedef ULONG DWORD ;
8
9#if 1
10DWORD GetTickCountOS2()
11{
12 ULONG ulTickCount;
13 APIRET rc;
14 rc = DosQuerySysInfo( QSV_MS_COUNT,
15 QSV_MS_COUNT,
16 &ulTickCount,
17 sizeof(ULONG));
18 return 0==rc?ulTickCount:0x00FFDEAD;
19}
20#else
21DWORD GetTickCountOS2()
22{
23 QWORD qwTickCount;
24 ULONG ulFreq;
25 ULONG ulTicks;
26 APIRET rc;
27
28 rc = DosTmrQueryFreq( &ulFreq);
29 dprintf(("DSOUND: GetTickCountOS2 Freq: %d(%08X)\n",
30 ulFreq, ulFreq));
31
32 if(0==rc)
33 {
34 rc = DosTmrQueryTime(&qwTickCount);
35 dprintf(("DSOUND: GetTickCountOS2 Time %d(%08X) : %d(%08X)\n",
36 qwTickCount.ulHi, qwTickCount.ulHi,
37 qwTickCount.ulLo,qwTickCount.ulLo, ulTicks));
38 ulTicks = GetMsCount(&qwTickCount,ulFreq);
39 dprintf(("DSOUND: GetTickCountOS2 ms Ticks %d\n"));
40 }
41 return 0==rc?ulTicks:0x00FFDEAD;
42}
43#endif
Note: See TracBrowser for help on using the repository browser.