1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-22 14:32:58 +02:00

Fix for Bug 781.

Fixes race condition on Audio thread state by using a mutex, so can play and use . (scrubbing forward) and SPACE (play/stop) safely.  Previously crashed.  Patch by Paul Licameli.
This commit is contained in:
james.k.crook@gmail.com
2014-11-06 17:48:26 +00:00
parent 94d97f87b8
commit ed1338cdec
2 changed files with 12 additions and 10 deletions

View File

@@ -490,8 +490,7 @@ private:
WaveTrackArray mPlaybackTracks;
Mixer **mPlaybackMixers;
int mStreamToken;
int mStopStreamCount;
volatile int mStreamToken;
static int mNextStreamToken;
double mFactor;
double mRate;
@@ -602,6 +601,10 @@ private:
unsigned long framesPerBuffer,
const PaStreamCallbackTimeInfo *timeInfo,
PaStreamCallbackFlags statusFlags, void *userData );
// Serialize main thread and PortAudio thread's attempts to pause and change
// the state used by the third, Audio thread.
wxMutex mSuspendAudioThread;
};
#endif