From 9505278c44e44742781bdc8460c96dd8730af9fc Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Mon, 17 Aug 2015 10:03:21 -0400 Subject: [PATCH] Disable caching for reassigned spectrogram --- src/WaveClip.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/WaveClip.cpp b/src/WaveClip.cpp index 9f6891488..ff1148fee 100644 --- a/src/WaveClip.cpp +++ b/src/WaveClip.cpp @@ -1055,7 +1055,7 @@ bool WaveClip::GetSpectrogram(WaveTrackCache &waveTrackCache, const int fftLen = windowSize * zeroPaddingFactor; const int half = fftLen / 2; - const bool match = + bool match = mSpecCache && mSpecCache->len > 0 && mSpecCache->Matches @@ -1069,6 +1069,11 @@ bool WaveClip::GetSpectrogram(WaveTrackCache &waveTrackCache, return false; //hit cache completely } + if (settings.algorithm == SpectrogramSettings::algReassignment) + // Caching is not implemented for reassignment, unless for + // a complete hit, because of the complications of time reassignment + match = false; + std::auto_ptr oldCache(mSpecCache); mSpecCache = 0;