Ignore:
Timestamp:
Feb 4, 2000, 8:29:17 PM (26 years ago)
Author:
hugh
Message:

some minor dsound fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/dsound/os2helper.cpp

    r1744 r2637  
    33#include <os2wrap.h>
    44#include <misc.h>
     5#include "asmutil.h"
    56
    67typedef ULONG DWORD ;
    78
    8 #if 0
     9#if 1
    910DWORD GetTickCountOS2()
    1011{
     
    2223  QWORD qwTickCount;
    2324  ULONG ulFreq;
    24   DWORD dwTick;
     25  ULONG ulTicks;
    2526  APIRET rc;
    2627
    2728  rc = DosTmrQueryFreq( &ulFreq);
     29  dprintf(("DSOUND: GetTickCountOS2 Freq: %d(%08X)\n",
     30           ulFreq, ulFreq));
     31
    2832  if(0==rc)
    2933  {
    3034    rc = DosTmrQueryTime(&qwTickCount);
    31     if(0==rc)
    32     {
    33       ulFreq /=1000;
    34       dwTick = qwTickCount.ulLo / ulFreq;
    35       //dwTick = ( (qwTickCount.ulHi <<24)+ (qwTickCount.ulLo>>8)) / (ulFreq>>8);
    36     }
     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"));
    3740  }
    38   //dprintf(("DSOUND: GetTickCountOS2 Freq: %d(%08X) Time %d(%08X) : %d(%08X)\n",
    39   //         ulFreq, ulFreq,
    40   //         qwTickCount.ulHi, qwTickCount.ulHi,
    41   //         qwTickCount.ulLo,qwTickCount.ulLo));
    42   return 0==rc?dwTick:0x00FFDEAD;
     41  return 0==rc?ulTicks:0x00FFDEAD;
    4342}
    4443#endif
Note: See TracChangeset for help on using the changeset viewer.