mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-19 06:07:42 +02:00
Redoing Steve's: Fix play from click position when Quick Play Loop in selection.
Minus the unnecessary change to ControlToolBar.cpp.
This commit is contained in:
parent
d8cabc14e5
commit
cefd21325e
@ -1767,6 +1767,20 @@ int AudioIO::StartStream(WaveTrackArray playbackTracks,
|
||||
AILASetStartTime();
|
||||
#endif
|
||||
|
||||
if (options.pStartTime)
|
||||
{
|
||||
// Calculate the new time position
|
||||
mTime = std::max(mT0, std::min(mT1, *options.pStartTime));
|
||||
// Reset mixer positions for all playback tracks
|
||||
unsigned numMixers = mPlaybackTracks.GetCount();
|
||||
for (unsigned ii = 0; ii < numMixers; ++ii)
|
||||
mPlaybackMixers[ii]->Reposition(mTime);
|
||||
if(mTimeTrack)
|
||||
mWarpedTime = mTimeTrack->ComputeWarpedLength(mT0, mTime);
|
||||
else
|
||||
mWarpedTime = mTime - mT0;
|
||||
}
|
||||
|
||||
#ifdef EXPERIMENTAL_SCRUBBING_SUPPORT
|
||||
delete mScrubQueue;
|
||||
if (scrubbing)
|
||||
|
@ -84,6 +84,7 @@ struct AudioIOStartStreamOptions
|
||||
, playLooped(false)
|
||||
, cutPreviewGapStart(0.0)
|
||||
, cutPreviewGapLen(0.0)
|
||||
, pStartTime(NULL)
|
||||
#ifdef EXPERIMENTAL_SCRUBBING_SUPPORT
|
||||
, scrubDelay(0.0)
|
||||
, maxScrubSpeed(1.0)
|
||||
@ -97,6 +98,7 @@ struct AudioIOStartStreamOptions
|
||||
bool playLooped;
|
||||
double cutPreviewGapStart;
|
||||
double cutPreviewGapLen;
|
||||
double * pStartTime;
|
||||
|
||||
#ifdef EXPERIMENTAL_SCRUBBING_SUPPORT
|
||||
// Positive value indicates that scrubbing will happen
|
||||
|
@ -2043,7 +2043,7 @@ void AdornedRulerPanel::OnMouseEvents(wxMouseEvent &evt)
|
||||
AudioIOStartStreamOptions options(mProject->GetDefaultPlayOptions());
|
||||
options.playLooped = (loopEnabled && evt.ShiftDown());
|
||||
|
||||
// options.pStartTime = &mPlayRegionStart;
|
||||
options.pStartTime = &mPlayRegionStart;
|
||||
ctb->PlayPlayRegion((SelectedRegion(start, end)),
|
||||
options,
|
||||
evt.ControlDown(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user