From e2539be53b8edc57113d7338af16e58f4efb9491 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Wed, 22 May 2019 07:42:08 -0400 Subject: [PATCH] WaveTrack::SyncLockAdjust doesn't need a factory to make a temp track --- src/WaveTrack.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/WaveTrack.cpp b/src/WaveTrack.cpp index d403db207..7027d93d3 100644 --- a/src/WaveTrack.cpp +++ b/src/WaveTrack.cpp @@ -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( + mDirManager, GetSampleFormat(), GetRate() ); tmp->InsertSilence(0.0, newT1 - oldT1); tmp->Flush();