# HG changeset patch
# User Chris Cannam
# Date 1470315776 -3600
# Node ID 825d0d7641ba3dfda096d7cd75bd9fe371b416ac
# Parent  4d0d94ba2ea786c57ad8d1d6fd0dc0f00822f771
Restore phase display

diff -r 4d0d94ba2ea7 -r 825d0d7641ba data/model/FFTModel.cpp
--- a/data/model/FFTModel.cpp	Wed Aug 03 16:16:23 2016 +0100
+++ b/data/model/FFTModel.cpp	Thu Aug 04 14:02:56 2016 +0100
@@ -103,6 +103,16 @@
     return move(col);
 }
 
+FFTModel::Column
+FFTModel::getPhases(int x) const
+{
+    auto cplx = getFFTColumn(x);
+    Column col;
+    col.reserve(cplx.size());
+    for (auto c: cplx) col.push_back(arg(c));
+    return move(col);
+}
+
 float
 FFTModel::getMagnitudeAt(int x, int y) const
 {
diff -r 4d0d94ba2ea7 -r 825d0d7641ba data/model/FFTModel.h
--- a/data/model/FFTModel.h	Wed Aug 03 16:16:23 2016 +0100
+++ b/data/model/FFTModel.h	Thu Aug 04 14:02:56 2016 +0100
@@ -76,6 +76,7 @@
     virtual float getMinimumLevel() const { return 0.f; } // Can't provide
     virtual float getMaximumLevel() const { return 1.f; } // Can't provide
     virtual Column getColumn(int x) const; // magnitudes
+    virtual Column getPhases(int x) const;
     virtual QString getBinName(int n) const;
     virtual bool shouldUseLogValueScale() const { return true; }
     virtual int getCompletion() const {
@@ -95,6 +96,8 @@
     int getWindowSize() const { return m_windowSize; }
     int getWindowIncrement() const { return m_windowIncrement; }
     int getFFTSize() const { return m_fftSize; }
+
+//!!! review which of these are ever actually called
     
     float getMagnitudeAt(int x, int y) const;
     float getMaximumMagnitudeAt(int x) const;