From 65c722bfe519a7076a894592b8b65a8a13735c9b Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Sun, 27 Nov 2016 19:50:52 -0500 Subject: [PATCH] Comment: resample, reformat of WaveClip needs no recursion for cutlines --- src/WaveClip.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/WaveClip.cpp b/src/WaveClip.cpp index 00c7ef09a..a81139ad2 100644 --- a/src/WaveClip.cpp +++ b/src/WaveClip.cpp @@ -1277,6 +1277,9 @@ bool WaveClip::GetRMS(float *rms, double t0, void WaveClip::ConvertToSampleFormat(sampleFormat format) { + // Note: it is not necessary to do this recursively to cutlines. + // They get converted as needed when they are expanded. + bool bChanged; bool bResult = mSequence->ConvertToSampleFormat(format, &bChanged); if (bResult && bChanged) @@ -1799,6 +1802,9 @@ void WaveClip::SetRate(int rate) bool WaveClip::Resample(int rate, ProgressDialog *progress) { + // Note: it is not necessary to do this recursively to cutlines. + // They get resampled as needed when they are expanded. + if (rate == mRate) return true; // Nothing to do