1 ///////////////////////////////////////////////////////////////////////////////
2 // $Source: x:/prj/tech/libsrc/sound/RCS/mixerlck.h $
4 // $Date: 1997/11/10 10:28:05 $
7 // Tools for thread synchronization and management.
16 ///////////////////////////////////////////////////////////////////////////////
18 // CLASS: cMixerAutoLock
20 // a threadMutex autolock for the mixer
21 // really could just be cMutexAutoLock, but hey
27 cMixerAutoLock(cThreadMutex
& mutex
);
31 cThreadMutex
& m_mutex
;
33 // make copy constructor and assignment operator inaccessible
34 cMixerAutoLock(const cMixerAutoLock
&);
35 cMixerAutoLock
&operator=(const cMixerAutoLock
&);
38 //////////////////////////////////////
40 // CLASS: cMixerAutoLock
44 cMixerAutoLock::cMixerAutoLock(cThreadMutex
& mutex
)
48 DWORD hr
=m_mutex
.Wait();
53 CriticalMsg("AutoLock of Mutex Wait Infinite Timeout or Abandon");
63 ///////////////////////////////////////
66 cMixerAutoLock::~cMixerAutoLock()
73 #endif /* !__MIXERLCK_H */