changeset 1199:4d0d94ba2ea7 spectrogram-minor-refactor

Re-enable (little-used) normalise-visible-range option in spectrogram layer
author Chris Cannam
date Wed, 03 Aug 2016 16:16:23 +0100
parents b494439a301c
children 825d0d7641ba
files base/MagnitudeRange.h
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/base/MagnitudeRange.h	Wed Aug 03 14:19:56 2016 +0100
+++ b/base/MagnitudeRange.h	Wed Aug 03 16:16:23 2016 +0100
@@ -26,9 +26,15 @@
 {
 public:
     MagnitudeRange() : m_min(0), m_max(0) { }
+    MagnitudeRange(float min, float max) : m_min(min), m_max(max) { }
+    
     bool operator==(const MagnitudeRange &r) {
 	return r.m_min == m_min && r.m_max == m_max;
     }
+    bool operator!=(const MagnitudeRange &r) {
+        return !(*this == r);
+    }
+    
     bool isSet() const { return (m_min != 0.f || m_max != 0.f); }
     void set(float min, float max) {
 	m_min = min;