summaryrefslogtreecommitdiff
path: root/libs/ardour/analyser.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-03-30 10:48:31 +0200
committerRobin Gareus <robin@gareus.org>2015-03-30 10:48:31 +0200
commitda42014c4d0508725447b820446eff94be241a19 (patch)
tree6cd3d8611eaf99986e2159c828b0982895ebebb2 /libs/ardour/analyser.cc
parentd1b70b2e24e846c93313d8fd54d7e8555227ca5e (diff)
fix crash #6161 - another throw w/o catch
The real problem is: libardourvampplugins:* cannot be instantiated this remains to be fixed.
Diffstat (limited to 'libs/ardour/analyser.cc')
-rw-r--r--libs/ardour/analyser.cc21
1 files changed, 14 insertions, 7 deletions
diff --git a/libs/ardour/analyser.cc b/libs/ardour/analyser.cc
index bf98ecc20a..fa22bd757d 100644
--- a/libs/ardour/analyser.cc
+++ b/libs/ardour/analyser.cc
@@ -22,6 +22,10 @@
#include "ardour/session_event.h"
#include "ardour/transient_detector.h"
+#include "pbd/compose.h"
+#include "pbd/error.h"
+#include "i18n.h"
+
using namespace std;
using namespace ARDOUR;
using namespace PBD;
@@ -102,13 +106,16 @@ Analyser::analyse_audio_file_source (boost::shared_ptr<AudioFileSource> src)
{
AnalysisFeatureList results;
- TransientDetector td (src->sample_rate());
-
- if (td.run (src->get_transients_path(), src.get(), 0, results) == 0) {
- src->set_been_analysed (true);
- } else {
+ try {
+ TransientDetector td (src->sample_rate());
+ if (td.run (src->get_transients_path(), src.get(), 0, results) == 0) {
+ src->set_been_analysed (true);
+ } else {
+ src->set_been_analysed (false);
+ }
+ } catch (...) {
+ error << string_compose(_("Transient Analysis failed for %1."), _("Audio File Source")) << endmsg;;
src->set_been_analysed (false);
+ return;
}
-
}
-