mirror of
https://github.com/cookiengineer/audacity
synced 2026-03-04 21:50:51 +01:00
Play region and its lock are stored together in ViewInfo
This commit is contained in:
@@ -487,11 +487,11 @@ void TranscriptionToolBar::PlayAtSpeed(bool looped, bool cutPreview)
|
||||
}
|
||||
|
||||
// Get the current play region
|
||||
double playRegionStart, playRegionEnd;
|
||||
p->GetPlayRegion(&playRegionStart, &playRegionEnd);
|
||||
const auto &viewInfo = ViewInfo::Get( *p );
|
||||
const auto &playRegion = viewInfo.playRegion;
|
||||
|
||||
// Start playing
|
||||
if (playRegionStart < 0)
|
||||
if (playRegion.GetStart() < 0)
|
||||
return;
|
||||
if (bFixedSpeedPlay)
|
||||
{
|
||||
@@ -504,8 +504,8 @@ void TranscriptionToolBar::PlayAtSpeed(bool looped, bool cutPreview)
|
||||
: options.playLooped ? PlayMode::loopedPlay
|
||||
: PlayMode::normalPlay;
|
||||
auto &bar = ControlToolBar::Get( *p );
|
||||
bar.PlayPlayRegion
|
||||
(SelectedRegion(playRegionStart, playRegionEnd),
|
||||
bar.PlayPlayRegion(
|
||||
SelectedRegion(playRegion.GetStart(), playRegion.GetEnd()),
|
||||
options,
|
||||
mode);
|
||||
}
|
||||
@@ -513,7 +513,7 @@ void TranscriptionToolBar::PlayAtSpeed(bool looped, bool cutPreview)
|
||||
{
|
||||
auto &scrubber = Scrubber::Get( *p );
|
||||
scrubber.StartSpeedPlay(GetPlaySpeed(),
|
||||
playRegionStart, playRegionEnd);
|
||||
playRegion.GetStart(), playRegion.GetEnd());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user