mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-02 16:49:41 +02:00
Don't busy-wait (excess CPU usage) after stopping scrub
This commit is contained in:
commit
ecbc3c75c6
@ -1798,6 +1798,10 @@ int AudioIO::StartStream(const WaveTrackArray &playbackTracks,
|
||||
if (mListener && captureChannels > 0)
|
||||
mListener->OnAudioIOStopRecording();
|
||||
mStreamToken = 0;
|
||||
|
||||
// Don't cause a busy wait in the audio thread after stopping scrubbing
|
||||
mPlayMode = PLAY_STRAIGHT;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -2100,6 +2104,10 @@ void AudioIO::StartStreamCleanup(bool bOnlyBuffers)
|
||||
mScrubQueue = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// Don't cause a busy wait in the audio thread after stopping scrubbing
|
||||
mPlayMode = PLAY_STRAIGHT;
|
||||
}
|
||||
|
||||
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||
@ -2530,6 +2538,9 @@ void AudioIO::StopStream()
|
||||
// Tell UI to hide sample rate
|
||||
mListener->OnAudioIORate(0);
|
||||
}
|
||||
|
||||
// Don't cause a busy wait in the audio thread after stopping scrubbing
|
||||
mPlayMode = PLAY_STRAIGHT;
|
||||
}
|
||||
|
||||
void AudioIO::SetPaused(bool state)
|
||||
|
Loading…
x
Reference in New Issue
Block a user