Patch the QM source code to make it buildable with MSVC
authorJohn Emmas <johne53@tiscali.co.uk>
Sun, 2 Apr 2017 13:32:26 +0000 (15:32 +0200)
committerRobin Gareus <robin@gareus.org>
Sun, 2 Apr 2017 13:32:26 +0000 (15:32 +0200)
libs/qm-dsp/dsp/signalconditioning/Filter.cpp
libs/qm-dsp/dsp/signalconditioning/Filter.h
tools/update_qm-dsp.sh

index e9523e229d1160480a9cc8a7e5508f17e150974d..53fb35abec1627e42e6bb6ffacb732e68953afda 100644 (file)
@@ -74,8 +74,8 @@ Filter::reset()
 }
 
 void
-Filter::process(const double *const __restrict__ in,
-               double *const __restrict__ out,
+Filter::process(const double *const __restrict in,
+               double *const __restrict out,
                const int n)
 {
     for (int s = 0; s < n; ++s) {
index 05f79e9723317f67baac698f732887fb550b66a9..8c1aee7313f4399d63c9cad58e8fb4520ae3c147 100644 (file)
@@ -42,8 +42,8 @@ public:
      * write the resulting \arg n samples into \arg out. There must be
      * enough room in \arg out for \arg n samples to be written.
      */
-    void process(const double *const __restrict__ in,
-                 double *const __restrict__ out,
+    void process(const double *const __restrict in,
+                 double *const __restrict out,
                  const int n);
 
     int getOrder() const { return m_order; }
index 5b769082da9fe9bc1006b930218a47dd7be73152..b102db80de65f565f397d3949bfe14925b33e74a 100755 (executable)
@@ -85,6 +85,54 @@ index f16a4b6c1..0253d6d4c 100644
      }
  
      void cut(double *src) const { 
+diff --git a/libs/qm-dsp/base/SincWindow.h b/libs/qm-dsp/base/SincWindow.h
+index bb35d90c2..02de92867 100644
+--- a/libs/qm-dsp/base/SincWindow.h
++++ b/libs/qm-dsp/base/SincWindow.h
+@@ -37,7 +37,7 @@ public:
+     }
+     const double *getWindow() const { 
+-      return m_window.data();
++      return &m_window[0];
+     }
+     void cut(double *src) const { 
+EOF
+
+## this applies to qm-vamp-plugins-v1.7.1-20-g4d15479
+## MSVC compatibility
+patch -p3 << EOF
+diff --git a/libs/qm-dsp/dsp/signalconditioning/Filter.cpp b/libs/qm-dsp/dsp/signalconditioning/Filter.cpp
+index e9523e229..53fb35abe 100644
+--- a/libs/qm-dsp/dsp/signalconditioning/Filter.cpp
++++ b/libs/qm-dsp/dsp/signalconditioning/Filter.cpp
+@@ -74,8 +74,8 @@ Filter::reset()
+ }
+ void
+-Filter::process(const double *const __restrict__ in,
+-              double *const __restrict__ out,
++Filter::process(const double *const __restrict in,
++              double *const __restrict out,
+               const int n)
+ {
+     for (int s = 0; s < n; ++s) {
+diff --git a/libs/qm-dsp/dsp/signalconditioning/Filter.h b/libs/qm-dsp/dsp/signalconditioning/Filter.h
+index 05f79e972..8c1aee731 100644
+--- a/libs/qm-dsp/dsp/signalconditioning/Filter.h
++++ b/libs/qm-dsp/dsp/signalconditioning/Filter.h
+@@ -42,8 +42,8 @@ public:
+      * write the resulting \arg n samples into \arg out. There must be
+      * enough room in \arg out for \arg n samples to be written.
+      */
+-    void process(const double *const __restrict__ in,
+-                 double *const __restrict__ out,
++    void process(const double *const __restrict in,
++                 double *const __restrict out,
+                  const int n);
+     int getOrder() const { return m_order; }
 EOF
 
 git add gitrev.txt base dsp ext maths