diff --git a/src/AudioIO.h b/src/AudioIO.h index b08d9dc25..ad0655482 100644 --- a/src/AudioIO.h +++ b/src/AudioIO.h @@ -168,6 +168,8 @@ class AUDACITY_DLL_API AudioIO { void SeekStream(double seconds) { mSeek = seconds; } #ifdef EXPERIMENTAL_SCRUBBING_SUPPORT + bool IsScrubbing() { return IsBusy() && mScrubQueue != 0; } + static double GetMaxScrubSpeed() { return 32.0; } // Is five octaves enough for your amusement? static double GetMinScrubSpeed() { return 0.01; } /** \brief enqueue a new end time, using the last end as the new start, diff --git a/src/toolbars/ControlToolBar.cpp b/src/toolbars/ControlToolBar.cpp index 4a9349100..fd4c61174 100644 --- a/src/toolbars/ControlToolBar.cpp +++ b/src/toolbars/ControlToolBar.cpp @@ -977,6 +977,13 @@ void ControlToolBar::OnRecord(wxCommandEvent &evt) void ControlToolBar::OnPause(wxCommandEvent & WXUNUSED(evt)) { +#ifdef EXPERIMENTAL_SCRUBBING_SUPPORT + if (gAudioIO->IsScrubbing()) + // Pausing does not make sense. Force the button + // to pop up below. + mPaused = true; +#endif + if(mPaused) { mPause->PopUp();