mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-14 17:14:07 +01:00
Scrub during play stops play, repositions play head
This commit is contained in:
@@ -203,19 +203,26 @@ void Scrubber::MarkScrubStart(
|
|||||||
SetScrollScrubbing (smoothScrolling);
|
SetScrollScrubbing (smoothScrolling);
|
||||||
#endif
|
#endif
|
||||||
mAlwaysSeeking = alwaysSeeking;
|
mAlwaysSeeking = alwaysSeeking;
|
||||||
mScrubStartPosition = xx;
|
|
||||||
mScrubStartClockTimeMillis = ::wxGetLocalTimeMillis();
|
|
||||||
|
|
||||||
ControlToolBar * const ctb = mProject->GetControlToolBar();
|
ControlToolBar * const ctb = mProject->GetControlToolBar();
|
||||||
|
|
||||||
|
// Stop any play in progress
|
||||||
|
ctb->StopPlaying();
|
||||||
|
// Usually the timer handler of TrackPanel does this, but we do this now,
|
||||||
|
// so that same timer does not StopPlaying() again after this function and destroy
|
||||||
|
// scrubber state
|
||||||
|
mProject->SetAudioIOToken(0);
|
||||||
|
|
||||||
ctb->SetPlay(true, ControlToolBar::PlayAppearance::Scrub);
|
ctb->SetPlay(true, ControlToolBar::PlayAppearance::Scrub);
|
||||||
if(gAudioIO->IsPaused())
|
|
||||||
ctb->Pause(); // un-pause
|
|
||||||
|
|
||||||
// This disables the pause button.
|
// This disables the pause button.
|
||||||
ctb->EnableDisableButtons();
|
ctb->EnableDisableButtons();
|
||||||
|
|
||||||
ctb->UpdateStatusBar(mProject);
|
ctb->UpdateStatusBar(mProject);
|
||||||
|
|
||||||
|
mScrubStartPosition = xx;
|
||||||
|
mScrubStartClockTimeMillis = ::wxGetLocalTimeMillis();
|
||||||
|
|
||||||
CheckMenuItem();
|
CheckMenuItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user