mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 16:46:35 +01:00
Don't crash if ardour vamp plugins are n/a #8161
This still assert()s in debug builds. Since those plugins should always be available.
This commit is contained in:
parent
3acd076304
commit
fe1f8effb9
1 changed files with 11 additions and 5 deletions
|
|
@ -38,11 +38,13 @@ LoudnessReader::LoudnessReader (float sample_rate, unsigned int channels, sample
|
|||
using namespace Vamp::HostExt;
|
||||
PluginLoader* loader (PluginLoader::getInstance ());
|
||||
_ebur_plugin = loader->loadPlugin ("libardourvampplugins:ebur128", sample_rate, PluginLoader::ADAPT_ALL_SAFE);
|
||||
assert (_ebur_plugin);
|
||||
_ebur_plugin->reset ();
|
||||
if (!_ebur_plugin->initialise (channels, _bufsize, _bufsize)) {
|
||||
delete _ebur_plugin;
|
||||
_ebur_plugin = 0;
|
||||
assert (_ebur_plugin); // should always be available
|
||||
if (_ebur_plugin) {
|
||||
_ebur_plugin->reset ();
|
||||
if (!_ebur_plugin->initialise (channels, _bufsize, _bufsize)) {
|
||||
delete _ebur_plugin;
|
||||
_ebur_plugin = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -50,6 +52,10 @@ LoudnessReader::LoudnessReader (float sample_rate, unsigned int channels, sample
|
|||
using namespace Vamp::HostExt;
|
||||
PluginLoader* loader (PluginLoader::getInstance ());
|
||||
Vamp::Plugin* dbtp_plugin = loader->loadPlugin ("libardourvampplugins:dBTP", sample_rate, PluginLoader::ADAPT_ALL_SAFE);
|
||||
assert (dbtp_plugin); // should always be available
|
||||
if (!dbtp_plugin) {
|
||||
continue;
|
||||
}
|
||||
dbtp_plugin->reset ();
|
||||
if (!dbtp_plugin->initialise (1, _bufsize, _bufsize)) {
|
||||
delete dbtp_plugin;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue