Ignore:
Timestamp:
Mar 5, 2003, 3:49:04 PM (22 years ago)
Author:
sandervl
Message:

waveoutGetPosition: return 0 if stream is not active (DART); waveinGetPosition: return 0 if stream is not active (DART); Don't print a warning for CALLBACK_NULL callbacks; Added ODIN_waveInSetFixedBuffers, renamed SetFixedWaveBufferSize to ODIN_waveOutSetFixedBuffers. Used to tell WINMM to use the waveOutWrite buffer size for the DART buffers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/winmm/os2timer.cpp

    r6933 r9902  
    1 /* $Id: os2timer.cpp,v 1.19 2001-10-03 13:47:58 sandervl Exp $ */
     1/* $Id: os2timer.cpp,v 1.20 2003-03-05 14:49:03 sandervl Exp $ */
    22
    33/*
     
    2424#include <win32api.h>
    2525#include <wprocess.h>
    26 #include <misc.h>
     26#include <dbglog.h>
     27#include <vmutex.h>
    2728
    2829#include "time.h"
     
    3637 * Structures                                                               *
    3738 ****************************************************************************/
    38  
     39static VMutex timeMutex;
    3940
    4041/****************************************************************************
     
    7071           dwPeriod));
    7172
     73  timeMutex.enter();
    7274  // add to linked list
    7375  OS2TimerResolution *timeRes = OS2TimerResolution::sTimerResolutions;
     
    8385  else
    8486    OS2TimerResolution::sTimerResolutions = this;
     87
     88  timeMutex.leave();
    8589
    8690  this->dwPeriod = dwPeriod;
     
    106110
    107111
     112  timeMutex.enter();
     113
    108114  // remove from linked list
    109115  OS2TimerResolution *timeRes = OS2TimerResolution::sTimerResolutions;
     
    121127  else
    122128    OS2TimerResolution::sTimerResolutions = timeRes->next;
     129
     130  timeMutex.leave();
    123131}
    124132
     
    166174           dwPeriod));
    167175
     176  timeMutex.enter();
    168177  OS2TimerResolution* timeRes = OS2TimerResolution::sTimerResolutions;
    169178
     
    178187    {
    179188      delete timeRes;              // so delete that object
     189      timeMutex.leave();
    180190      return TRUE;                 // OK, can remove the entry
    181191    }
    182192 }
     193 timeMutex.leave();
     194
    183195 return FALSE;                     // nope, mismatch !
    184196}
     
    199211int OS2TimerResolution::queryCurrentResolution()
    200212{
     213  timeMutex.enter();
    201214  OS2TimerResolution *timeRes = OS2TimerResolution::sTimerResolutions;
    202215  int                iMin = -1;
     
    210223        iMin = timeRes->dwPeriod;
    211224    }
     225  timeMutex.leave();
    212226
    213227  dprintf(("WINMM:OS2Timer: OS2TimerResolution::queryCurrentResolution == %08xh\n",
     
    230244           this));
    231245
     246  timeMutex.enter();
    232247  OS2Timer *timer = OS2Timer::timers;
    233248
     
    242257  else
    243258    timers = this;
     259  timeMutex.leave();
    244260 
    245261  // create timer semaphore
     
    274290           this));
    275291
     292  KillTimer();
     293
     294  timeMutex.enter();
    276295  OS2Timer *timer = OS2Timer::timers;
    277296
    278   KillTimer();
    279 
    280297  if(timer != this)
    281298  {
     
    288305  else
    289306    timers = timer->next;
     307
     308  timeMutex.leave();
    290309}
    291310/******************************************************************************/
Note: See TracChangeset for help on using the changeset viewer.