mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-16 17:41:14 +01:00
Simplified some management of WaveClip caches
This commit is contained in:
@@ -166,5 +166,26 @@ protected:
|
||||
|
||||
#endif // __WXMAC__
|
||||
|
||||
// Like wxMutexLocker
|
||||
// So you can use the RAII idiom with ODLock, on whatever platform
|
||||
class ODLocker
|
||||
{
|
||||
public:
|
||||
ODLocker(ODLock &lock)
|
||||
: mLock(lock)
|
||||
{
|
||||
mLock.Lock();
|
||||
}
|
||||
|
||||
~ODLocker()
|
||||
{
|
||||
mLock.Unlock();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
ODLock &mLock;
|
||||
};
|
||||
|
||||
#endif //__AUDACITY_ODTASKTHREAD__
|
||||
|
||||
|
||||
Reference in New Issue
Block a user