boost::shared_ptr<AudioFileSource> afs = boost::dynamic_pointer_cast<AudioFileSource> (src);
boost::shared_ptr<AudioFileSource> afs = boost::dynamic_pointer_cast<AudioFileSource> (src);
+ if (afs && afs->length()) {
analyse_audio_file_source (afs);
}
}
analyse_audio_file_source (afs);
}
}
TransientDetector td (src->sample_rate());
TransientDetector td (src->sample_rate());
- cerr << "analyzing " << src->name () << endl;
-
if (td.run (src->get_transients_path(), src.get(), 0, results) == 0) {
src->set_been_analysed (true);
} else {
if (td.run (src->get_transients_path(), src.get(), 0, results) == 0) {
src->set_been_analysed (true);
} else {
using namespace ARDOUR;
using namespace std;
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"))
{
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
+ _op_id = X_("libardourvampplugins:percussiononsets");
+
+ // XXX this should load the above-named plugin and get the current version
+
+ _op_id += ":2";
}
TransientDetector::~TransientDetector()
}
TransientDetector::~TransientDetector()