diff layer/SpectrogramLayer.cpp @ 1399:ba1f0234efa7

Fixes to spectrum axis calculations, + default to starting at bin 1
author Chris Cannam
date Wed, 14 Nov 2018 15:47:21 +0000
parents 2df1af7ac752
children 10e768adaee5
line wrap: on
line diff
--- a/layer/SpectrogramLayer.cpp	Wed Nov 14 15:14:21 2018 +0000
+++ b/layer/SpectrogramLayer.cpp	Wed Nov 14 15:47:21 2018 +0000
@@ -698,7 +698,6 @@
         return;
     }
     if (name == "Spectrogram Y Smoothing") {
-        setWindowSize(m_windowSize);
         invalidateRenderers();
         invalidateMagnitudes();
         emit layerParametersChanged();
@@ -783,21 +782,6 @@
 SpectrogramLayer::getOversampling() const
 {
     return m_oversampling;
-    /*!!!
-    if (m_binDisplay != BinDisplay::AllBins) {
-        return 1;
-    }
-
-    Preferences::SpectrogramSmoothing smoothing = 
-        Preferences::getInstance()->getSpectrogramSmoothing();
-    
-    if (smoothing == Preferences::NoSpectrogramSmoothing ||
-        smoothing == Preferences::SpectrogramInterpolated) {
-        return 1;
-    }
-
-    return 4;
-    */
 }
 
 void
@@ -1556,8 +1540,7 @@
         Preferences::SpectrogramSmoothing smoothing = 
             Preferences::getInstance()->getSpectrogramSmoothing();
         params.interpolate = 
-            (smoothing == Preferences::SpectrogramInterpolated ||
-             smoothing == Preferences::SpectrogramZeroPaddedAndInterpolated);
+            (smoothing != Preferences::NoSpectrogramSmoothing);
 
         m_renderers[viewId] = new Colour3DPlotRenderer(sources, params);