mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-13 10:06:33 +01:00
refuse to load LV2 plugins if buffersize requirements cannot be satisfied.
This commit is contained in:
parent
dace872af8
commit
ac1065b43b
1 changed files with 18 additions and 0 deletions
|
|
@ -155,6 +155,8 @@ public:
|
||||||
LilvNode* units_midiNote;
|
LilvNode* units_midiNote;
|
||||||
LilvNode* patch_writable;
|
LilvNode* patch_writable;
|
||||||
LilvNode* patch_Message;
|
LilvNode* patch_Message;
|
||||||
|
LilvNode* bufz_powerOf2BlockLength;
|
||||||
|
LilvNode* bufz_fixedBlockLength;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool _bundle_checked;
|
bool _bundle_checked;
|
||||||
|
|
@ -428,6 +430,16 @@ LV2Plugin::init(const void* c_plugin, framecnt_t rate)
|
||||||
lilv_node_free(_impl->author);
|
lilv_node_free(_impl->author);
|
||||||
throw failed_constructor();
|
throw failed_constructor();
|
||||||
}
|
}
|
||||||
|
if (lilv_plugin_has_feature(plugin, _world.bufz_powerOf2BlockLength) ||
|
||||||
|
lilv_plugin_has_feature(plugin, _world.bufz_fixedBlockLength)
|
||||||
|
) {
|
||||||
|
error << string_compose(
|
||||||
|
_("LV2: \"%1\" buffer-size requirements cannot be satisfied."),
|
||||||
|
lilv_node_as_string(_impl->name)) << endmsg;
|
||||||
|
lilv_node_free(_impl->name);
|
||||||
|
lilv_node_free(_impl->author);
|
||||||
|
throw failed_constructor();
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef HAVE_LILV_0_16_0
|
#ifdef HAVE_LILV_0_16_0
|
||||||
// Load default state
|
// Load default state
|
||||||
|
|
@ -2369,10 +2381,16 @@ LV2World::LV2World()
|
||||||
units_db = lilv_new_uri(world, LV2_UNITS__db);
|
units_db = lilv_new_uri(world, LV2_UNITS__db);
|
||||||
patch_writable = lilv_new_uri(world, LV2_PATCH__writable);
|
patch_writable = lilv_new_uri(world, LV2_PATCH__writable);
|
||||||
patch_Message = lilv_new_uri(world, LV2_PATCH__Message);
|
patch_Message = lilv_new_uri(world, LV2_PATCH__Message);
|
||||||
|
|
||||||
|
bufz_powerOf2BlockLength = lilv_new_uri(world, LV2_BUF_SIZE__powerOf2BlockLength);
|
||||||
|
bufz_fixedBlockLength = lilv_new_uri(world, LV2_BUF_SIZE__fixedBlockLength);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LV2World::~LV2World()
|
LV2World::~LV2World()
|
||||||
{
|
{
|
||||||
|
lilv_node_free(bufz_fixedBlockLength);
|
||||||
|
lilv_node_free(bufz_powerOf2BlockLength);
|
||||||
lilv_node_free(patch_Message);
|
lilv_node_free(patch_Message);
|
||||||
lilv_node_free(patch_writable);
|
lilv_node_free(patch_writable);
|
||||||
lilv_node_free(units_hz);
|
lilv_node_free(units_hz);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue