1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-23 23:03:55 +02:00

TrackFactory functions return std::unique_ptr, although some callers...

... release() them for now.
This commit is contained in:
Paul Licameli
2016-03-02 14:59:31 -05:00
parent f42a953752
commit 5ef4dd46a5
31 changed files with 91 additions and 135 deletions

View File

@@ -475,7 +475,7 @@ bool EffectChangeSpeed::ProcessOne(WaveTrack * track,
// initialization, per examples of Mixer::Mixer and
// EffectSoundTouch::ProcessOne
WaveTrack * outputTrack = mFactory->NewWaveTrack(track->GetSampleFormat(),
auto outputTrack = mFactory->NewWaveTrack(track->GetSampleFormat(),
track->GetRate());
//Get the length of the selection (as double). len is
@@ -552,15 +552,12 @@ bool EffectChangeSpeed::ProcessOne(WaveTrack * track,
if (bResult)
{
SetTimeWarper(new LinearTimeWarper(mCurT0, mCurT0, mCurT1, mCurT0 + newLength));
bResult = track->ClearAndPaste(mCurT0, mCurT1, outputTrack, true, false, GetTimeWarper());
bResult = track->ClearAndPaste(mCurT0, mCurT1, outputTrack.get(), true, false, GetTimeWarper());
}
if (newLength > mMaxNewLength)
mMaxNewLength = newLength;
// Delete the outputTrack now that its data is inserted in place
delete outputTrack;
return bResult;
}