changeset 124:7e5fc22c9ab1

* Fix beat counts prior to first bar
author Chris Cannam <c.cannam@qmul.ac.uk>
date Thu, 25 Jun 2009 13:28:19 +0000
parents 25ef867820ba
children dd01b0a81f1b
files plugins/BarBeatTrack.cpp qm-vamp-plugins.pro
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/BarBeatTrack.cpp	Tue Jun 16 11:55:50 2009 +0000
+++ b/plugins/BarBeatTrack.cpp	Thu Jun 25 13:28:19 2009 +0000
@@ -345,6 +345,14 @@
     int beat = 0;
     int bar = 0;
 
+    if (!downbeats.empty()) {
+        // get the right number for the first beat; this will be
+        // incremented before use (at top of the following loop)
+        int firstDown = downbeats[0];
+        beat = m_bpb - firstDown - 1;
+        if (beat == m_bpb) beat = 0;
+    }
+
     for (size_t i = 0; i < beats.size(); ++i) {
 
 	size_t frame = beats[i] * m_d->dfConfig.stepSize;
--- a/qm-vamp-plugins.pro	Tue Jun 16 11:55:50 2009 +0000
+++ b/qm-vamp-plugins.pro	Thu Jun 25 13:28:19 2009 +0000
@@ -16,7 +16,7 @@
 
 linux-g++-64 {
     QMAKE_CXXFLAGS_RELEASE += -msse2
-    LIBS += -Lbuild/linux/amd64  -Wl,-Bstatic -lqm-dsp -lvamp-sdk -llapack -lcblas -latlas $$system(g++ -print-file-name=libstdc++.a) -lc -Wl,-Bdynamic -lpthread -Wl,--version-script=vamp-plugin.map
+    LIBS += -Lbuild/linux/amd64  -Wl,-Bstatic -lqm-dsp -lvamp-sdk -llapack -lcblas -latlas -lc -Wl,-Bdynamic -lpthread -Wl,--version-script=vamp-plugin.map
 }
 
 macx-g++* {