summaryrefslogtreecommitdiff
path: root/libs/ardour/audioregion.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/audioregion.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/audioregion.cc')
-rw-r--r--libs/ardour/audioregion.cc37
1 files changed, 22 insertions, 15 deletions
diff --git a/libs/ardour/audioregion.cc b/libs/ardour/audioregion.cc
index 1ea788880b..37bf3e1fed 100644
--- a/libs/ardour/audioregion.cc
+++ b/libs/ardour/audioregion.cc
@@ -1696,31 +1696,38 @@ in this and future transient-detection operations.\n\
}
}
- TransientDetector t (pl->session().frame_rate());
bool existing_results = !results.empty();
- _transients.clear ();
- _valid_transients = false;
+ try {
- for (uint32_t i = 0; i < n_channels(); ++i) {
+ TransientDetector t (pl->session().frame_rate());
- AnalysisFeatureList these_results;
+ _transients.clear ();
+ _valid_transients = false;
- t.reset ();
+ for (uint32_t i = 0; i < n_channels(); ++i) {
- if (t.run ("", this, i, these_results)) {
- return -1;
- }
+ AnalysisFeatureList these_results;
- /* translate all transients to give absolute position */
+ t.reset ();
- for (AnalysisFeatureList::iterator i = these_results.begin(); i != these_results.end(); ++i) {
- (*i) += _position;
- }
+ if (t.run ("", this, i, these_results)) {
+ return -1;
+ }
- /* merge */
+ /* translate all transients to give absolute position */
- _transients.insert (_transients.end(), these_results.begin(), these_results.end());
+ for (AnalysisFeatureList::iterator i = these_results.begin(); i != these_results.end(); ++i) {
+ (*i) += _position;
+ }
+
+ /* merge */
+
+ _transients.insert (_transients.end(), these_results.begin(), these_results.end());
+ }
+ } catch (...) {
+ error << string_compose(_("Transient Analysis failed for %1."), _("Audio Region")) << endmsg;
+ return -1;
}
if (!results.empty()) {