1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-11 09:31:13 +02:00

WaveTrack::SyncLockAdjust doesn't need a factory to make a temp track

This commit is contained in:
Paul Licameli 2019-05-22 07:42:08 -04:00
parent 914bb1dc95
commit e2539be53b

View File

@ -1098,11 +1098,8 @@ void WaveTrack::SyncLockAdjust(double oldT1, double newT1)
else {
// AWD: Could just use InsertSilence() on its own here, but it doesn't
// follow EditClipCanMove rules (Paste() does it right)
AudacityProject *p = GetActiveProject();
if (!p)
THROW_INCONSISTENCY_EXCEPTION;
auto &factory = TrackFactory::Get( *p );
auto tmp = factory.NewWaveTrack( GetSampleFormat(), GetRate() );
auto tmp = std::make_shared<WaveTrack>(
mDirManager, GetSampleFormat(), GetRate() );
tmp->InsertSilence(0.0, newT1 - oldT1);
tmp->Flush();