interpolation.cc/.h: Spline-Bugfixes: Crash bug at tempos close to 0, wrong calculati...
[ardour.git] / libs / ardour / transient_detector.cc
index b92bf5fb2de61a2034154c901f79881efca0b4db..da167e4bd674020b8f967dc9ebfdc95adeacf8e0 100644 (file)
@@ -1,4 +1,4 @@
-#include <ardour/transient_detector.h>
+#include "ardour/transient_detector.h"
 
 #include "i18n.h"
 
@@ -6,18 +6,20 @@ using namespace Vamp;
 using namespace ARDOUR;
 using namespace std;
 
-string TransientDetector::_op_id;
+/* need a static initializer function for this */
+
+string TransientDetector::_op_id = X_("libardourvampplugins:percussiononsets:2");
 
 TransientDetector::TransientDetector (float sr)
        : AudioAnalyser (sr, X_("libardourvampplugins:percussiononsets"))
 {
-       if (_op_id.empty()) {
-               _op_id = X_("libardourvampplugins:percussiononsets");
-
-               // XXX this should load the above-named plugin and get the current version
+       /* update the op_id */
 
-               _op_id += ":2";
-       }
+       _op_id = X_("libardourvampplugins:percussiononsets");
+       
+       // XXX this should load the above-named plugin and get the current version
+       
+       _op_id += ":2";
 }
 
 TransientDetector::~TransientDetector()
@@ -52,7 +54,7 @@ TransientDetector::use_features (Plugin::FeatureSet& features, ostream* out)
                        if (out) {
                                (*out) << (*f).timestamp.toString() << endl;
                        } 
-
+                       
                        current_results->push_back (RealTime::realTime2Frame ((*f).timestamp, (nframes_t) floor(sample_rate)));
                }
        }