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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user