mirror of
https://github.com/cookiengineer/audacity
synced 2025-09-18 09:00:52 +02:00
A mutex guarding access to this variable made volatile unnecessary
This commit is contained in:
parent
2a7d8dca77
commit
854651306c
@ -31,6 +31,7 @@ DEFINE_EVENT_TYPE(EVT_ODTASK_COMPLETE)
|
|||||||
|
|
||||||
/// Constructs an ODTask
|
/// Constructs an ODTask
|
||||||
ODTask::ODTask()
|
ODTask::ODTask()
|
||||||
|
: mDemandSample(0)
|
||||||
{
|
{
|
||||||
|
|
||||||
static int sTaskNumber=0;
|
static int sTaskNumber=0;
|
||||||
@ -41,8 +42,6 @@ ODTask::ODTask()
|
|||||||
mIsRunning = false;
|
mIsRunning = false;
|
||||||
|
|
||||||
mTaskNumber=sTaskNumber++;
|
mTaskNumber=sTaskNumber++;
|
||||||
|
|
||||||
mDemandSample=0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//outside code must ensure this task is not scheduled again.
|
//outside code must ensure this task is not scheduled again.
|
||||||
|
@ -159,7 +159,7 @@ class ODTask /* not final */
|
|||||||
std::vector<WaveTrack*> mWaveTracks;
|
std::vector<WaveTrack*> mWaveTracks;
|
||||||
ODLock mWaveTrackMutex;
|
ODLock mWaveTrackMutex;
|
||||||
|
|
||||||
volatile sampleCount mDemandSample;
|
sampleCount mDemandSample;
|
||||||
mutable ODLock mDemandSampleMutex;
|
mutable ODLock mDemandSampleMutex;
|
||||||
|
|
||||||
volatile bool mIsRunning;
|
volatile bool mIsRunning;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user