mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-13 01:56:34 +01:00
Fix a crash in rhythm ferret if the relevant plugin couldn't be found for some reason
The crash was caused by not catching 'failed_constructor()' (which gets thrown in the c'tor for AudioAnalyser).
This commit is contained in:
parent
d1599abad3
commit
efd859a0ee
1 changed files with 22 additions and 16 deletions
|
|
@ -253,6 +253,7 @@ RhythmFerret::run_analysis ()
|
||||||
int
|
int
|
||||||
RhythmFerret::run_percussion_onset_analysis (boost::shared_ptr<Readable> readable, frameoffset_t /*offset*/, AnalysisFeatureList& results)
|
RhythmFerret::run_percussion_onset_analysis (boost::shared_ptr<Readable> readable, frameoffset_t /*offset*/, AnalysisFeatureList& results)
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
TransientDetector t (_session->frame_rate());
|
TransientDetector t (_session->frame_rate());
|
||||||
|
|
||||||
for (uint32_t i = 0; i < readable->n_channels(); ++i) {
|
for (uint32_t i = 0; i < readable->n_channels(); ++i) {
|
||||||
|
|
@ -277,6 +278,11 @@ RhythmFerret::run_percussion_onset_analysis (boost::shared_ptr<Readable> readabl
|
||||||
t.update_positions (readable.get(), i, results);
|
t.update_positions (readable.get(), i, results);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} catch (failed_constructor& err) {
|
||||||
|
error << "Could not load percussion onset detection plugin" << endmsg;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue