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:
@@ -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
|
||||
|
Reference in New Issue
Block a user