LV2: Ignore connection optional ports
This commit is contained in:
parent
4b31a1078a
commit
5a1fc0ddc9
@ -186,6 +186,7 @@ public:
|
|||||||
LilvNode* lv2_ControlPort;
|
LilvNode* lv2_ControlPort;
|
||||||
LilvNode* lv2_InputPort;
|
LilvNode* lv2_InputPort;
|
||||||
LilvNode* lv2_OutputPort;
|
LilvNode* lv2_OutputPort;
|
||||||
|
LilvNode* lv2_connectionOptional;
|
||||||
LilvNode* lv2_designation;
|
LilvNode* lv2_designation;
|
||||||
LilvNode* lv2_enumeration;
|
LilvNode* lv2_enumeration;
|
||||||
LilvNode* lv2_freewheeling;
|
LilvNode* lv2_freewheeling;
|
||||||
@ -837,7 +838,7 @@ LV2Plugin::init(const void* c_plugin, samplecnt_t rate)
|
|||||||
lilv_nodes_free(min_size_v);
|
lilv_nodes_free(min_size_v);
|
||||||
lilv_nodes_free(buffer_types);
|
lilv_nodes_free(buffer_types);
|
||||||
lilv_nodes_free(atom_supports);
|
lilv_nodes_free(atom_supports);
|
||||||
} else {
|
} else if (!lilv_port_has_property(_impl->plugin, port, _world.lv2_connectionOptional)) {
|
||||||
error << string_compose(
|
error << string_compose(
|
||||||
"LV2: \"%1\" port %2 has no known data type",
|
"LV2: \"%1\" port %2 has no known data type",
|
||||||
lilv_node_as_string(_impl->name), i) << endmsg;
|
lilv_node_as_string(_impl->name), i) << endmsg;
|
||||||
@ -3494,58 +3495,59 @@ LV2World::LV2World()
|
|||||||
: world(lilv_world_new())
|
: world(lilv_world_new())
|
||||||
, _bundle_checked(false)
|
, _bundle_checked(false)
|
||||||
{
|
{
|
||||||
atom_AtomPort = lilv_new_uri(world, LV2_ATOM__AtomPort);
|
atom_AtomPort = lilv_new_uri(world, LV2_ATOM__AtomPort);
|
||||||
atom_Chunk = lilv_new_uri(world, LV2_ATOM__Chunk);
|
atom_Chunk = lilv_new_uri(world, LV2_ATOM__Chunk);
|
||||||
atom_Sequence = lilv_new_uri(world, LV2_ATOM__Sequence);
|
atom_Sequence = lilv_new_uri(world, LV2_ATOM__Sequence);
|
||||||
atom_bufferType = lilv_new_uri(world, LV2_ATOM__bufferType);
|
atom_bufferType = lilv_new_uri(world, LV2_ATOM__bufferType);
|
||||||
atom_supports = lilv_new_uri(world, LV2_ATOM__supports);
|
atom_supports = lilv_new_uri(world, LV2_ATOM__supports);
|
||||||
atom_eventTransfer = lilv_new_uri(world, LV2_ATOM__eventTransfer);
|
atom_eventTransfer = lilv_new_uri(world, LV2_ATOM__eventTransfer);
|
||||||
ev_EventPort = lilv_new_uri(world, LILV_URI_EVENT_PORT);
|
ev_EventPort = lilv_new_uri(world, LILV_URI_EVENT_PORT);
|
||||||
ext_logarithmic = lilv_new_uri(world, LV2_PORT_PROPS__logarithmic);
|
ext_logarithmic = lilv_new_uri(world, LV2_PORT_PROPS__logarithmic);
|
||||||
ext_notOnGUI = lilv_new_uri(world, LV2_PORT_PROPS__notOnGUI);
|
ext_notOnGUI = lilv_new_uri(world, LV2_PORT_PROPS__notOnGUI);
|
||||||
ext_expensive = lilv_new_uri(world, LV2_PORT_PROPS__expensive);
|
ext_expensive = lilv_new_uri(world, LV2_PORT_PROPS__expensive);
|
||||||
ext_causesArtifacts= lilv_new_uri(world, LV2_PORT_PROPS__causesArtifacts);
|
ext_causesArtifacts = lilv_new_uri(world, LV2_PORT_PROPS__causesArtifacts);
|
||||||
ext_notAutomatic = lilv_new_uri(world, LV2_PORT_PROPS__notAutomatic);
|
ext_notAutomatic = lilv_new_uri(world, LV2_PORT_PROPS__notAutomatic);
|
||||||
ext_rangeSteps = lilv_new_uri(world, LV2_PORT_PROPS__rangeSteps);
|
ext_rangeSteps = lilv_new_uri(world, LV2_PORT_PROPS__rangeSteps);
|
||||||
ext_displayPriority= lilv_new_uri(world, LV2_PORT_PROPS__displayPriority);
|
ext_displayPriority = lilv_new_uri(world, LV2_PORT_PROPS__displayPriority);
|
||||||
groups_group = lilv_new_uri(world, LV2_PORT_GROUPS__group);
|
groups_group = lilv_new_uri(world, LV2_PORT_GROUPS__group);
|
||||||
groups_element = lilv_new_uri(world, LV2_PORT_GROUPS__element);
|
groups_element = lilv_new_uri(world, LV2_PORT_GROUPS__element);
|
||||||
lv2_AudioPort = lilv_new_uri(world, LILV_URI_AUDIO_PORT);
|
lv2_AudioPort = lilv_new_uri(world, LILV_URI_AUDIO_PORT);
|
||||||
lv2_ControlPort = lilv_new_uri(world, LILV_URI_CONTROL_PORT);
|
lv2_ControlPort = lilv_new_uri(world, LILV_URI_CONTROL_PORT);
|
||||||
lv2_InputPort = lilv_new_uri(world, LILV_URI_INPUT_PORT);
|
lv2_InputPort = lilv_new_uri(world, LILV_URI_INPUT_PORT);
|
||||||
lv2_OutputPort = lilv_new_uri(world, LILV_URI_OUTPUT_PORT);
|
lv2_OutputPort = lilv_new_uri(world, LILV_URI_OUTPUT_PORT);
|
||||||
lv2_inPlaceBroken = lilv_new_uri(world, LV2_CORE__inPlaceBroken);
|
lv2_connectionOptional = lilv_new_uri(world, LV2_CORE__connectionOptional);
|
||||||
lv2_isSideChain = lilv_new_uri(world, LV2_CORE_PREFIX "isSideChain");
|
lv2_inPlaceBroken = lilv_new_uri(world, LV2_CORE__inPlaceBroken);
|
||||||
lv2_index = lilv_new_uri(world, LV2_CORE__index);
|
lv2_isSideChain = lilv_new_uri(world, LV2_CORE_PREFIX "isSideChain");
|
||||||
lv2_integer = lilv_new_uri(world, LV2_CORE__integer);
|
lv2_index = lilv_new_uri(world, LV2_CORE__index);
|
||||||
lv2_default = lilv_new_uri(world, LV2_CORE__default);
|
lv2_integer = lilv_new_uri(world, LV2_CORE__integer);
|
||||||
lv2_minimum = lilv_new_uri(world, LV2_CORE__minimum);
|
lv2_default = lilv_new_uri(world, LV2_CORE__default);
|
||||||
lv2_maximum = lilv_new_uri(world, LV2_CORE__maximum);
|
lv2_minimum = lilv_new_uri(world, LV2_CORE__minimum);
|
||||||
lv2_reportsLatency = lilv_new_uri(world, LV2_CORE__reportsLatency);
|
lv2_maximum = lilv_new_uri(world, LV2_CORE__maximum);
|
||||||
lv2_sampleRate = lilv_new_uri(world, LV2_CORE__sampleRate);
|
lv2_reportsLatency = lilv_new_uri(world, LV2_CORE__reportsLatency);
|
||||||
lv2_toggled = lilv_new_uri(world, LV2_CORE__toggled);
|
lv2_sampleRate = lilv_new_uri(world, LV2_CORE__sampleRate);
|
||||||
lv2_designation = lilv_new_uri(world, LV2_CORE__designation);
|
lv2_toggled = lilv_new_uri(world, LV2_CORE__toggled);
|
||||||
lv2_enumeration = lilv_new_uri(world, LV2_CORE__enumeration);
|
lv2_designation = lilv_new_uri(world, LV2_CORE__designation);
|
||||||
lv2_freewheeling = lilv_new_uri(world, LV2_CORE__freeWheeling);
|
lv2_enumeration = lilv_new_uri(world, LV2_CORE__enumeration);
|
||||||
midi_MidiEvent = lilv_new_uri(world, LILV_URI_MIDI_EVENT);
|
lv2_freewheeling = lilv_new_uri(world, LV2_CORE__freeWheeling);
|
||||||
rdfs_comment = lilv_new_uri(world, LILV_NS_RDFS "comment");
|
midi_MidiEvent = lilv_new_uri(world, LILV_URI_MIDI_EVENT);
|
||||||
rdfs_label = lilv_new_uri(world, LILV_NS_RDFS "label");
|
rdfs_comment = lilv_new_uri(world, LILV_NS_RDFS "comment");
|
||||||
rdfs_range = lilv_new_uri(world, LILV_NS_RDFS "range");
|
rdfs_label = lilv_new_uri(world, LILV_NS_RDFS "label");
|
||||||
rsz_minimumSize = lilv_new_uri(world, LV2_RESIZE_PORT__minimumSize);
|
rdfs_range = lilv_new_uri(world, LILV_NS_RDFS "range");
|
||||||
time_Position = lilv_new_uri(world, LV2_TIME__Position);
|
rsz_minimumSize = lilv_new_uri(world, LV2_RESIZE_PORT__minimumSize);
|
||||||
time_beatsPerMin = lilv_new_uri(world, LV2_TIME__beatsPerMinute);
|
time_Position = lilv_new_uri(world, LV2_TIME__Position);
|
||||||
ui_GtkUI = lilv_new_uri(world, LV2_UI__GtkUI);
|
time_beatsPerMin = lilv_new_uri(world, LV2_TIME__beatsPerMinute);
|
||||||
ui_X11UI = lilv_new_uri(world, LV2_UI__X11UI);
|
ui_GtkUI = lilv_new_uri(world, LV2_UI__GtkUI);
|
||||||
ui_external = lilv_new_uri(world, "http://lv2plug.in/ns/extensions/ui#external");
|
ui_X11UI = lilv_new_uri(world, LV2_UI__X11UI);
|
||||||
ui_externalkx = lilv_new_uri(world, "http://kxstudio.sf.net/ns/lv2ext/external-ui#Widget");
|
ui_external = lilv_new_uri(world, "http://lv2plug.in/ns/extensions/ui#external");
|
||||||
units_unit = lilv_new_uri(world, LV2_UNITS__unit);
|
ui_externalkx = lilv_new_uri(world, "http://kxstudio.sf.net/ns/lv2ext/external-ui#Widget");
|
||||||
units_render = lilv_new_uri(world, LV2_UNITS__render);
|
units_unit = lilv_new_uri(world, LV2_UNITS__unit);
|
||||||
units_hz = lilv_new_uri(world, LV2_UNITS__hz);
|
units_render = lilv_new_uri(world, LV2_UNITS__render);
|
||||||
units_midiNote = lilv_new_uri(world, LV2_UNITS__midiNote);
|
units_hz = lilv_new_uri(world, LV2_UNITS__hz);
|
||||||
units_db = lilv_new_uri(world, LV2_UNITS__db);
|
units_midiNote = lilv_new_uri(world, LV2_UNITS__midiNote);
|
||||||
patch_writable = lilv_new_uri(world, LV2_PATCH__writable);
|
units_db = lilv_new_uri(world, LV2_UNITS__db);
|
||||||
patch_Message = lilv_new_uri(world, LV2_PATCH__Message);
|
patch_writable = lilv_new_uri(world, LV2_PATCH__writable);
|
||||||
opts_requiredOptions = lilv_new_uri(world, LV2_OPTIONS__requiredOption);
|
patch_Message = lilv_new_uri(world, LV2_PATCH__Message);
|
||||||
|
opts_requiredOptions = lilv_new_uri(world, LV2_OPTIONS__requiredOption);
|
||||||
#ifdef LV2_EXTENDED
|
#ifdef LV2_EXTENDED
|
||||||
lv2_noSampleAccurateCtrl = lilv_new_uri(world, "http://ardour.org/lv2/ext#noSampleAccurateControls"); // deprecated 2016-09-18
|
lv2_noSampleAccurateCtrl = lilv_new_uri(world, "http://ardour.org/lv2/ext#noSampleAccurateControls"); // deprecated 2016-09-18
|
||||||
routing_connectAllOutputs = lilv_new_uri(world, LV2_ROUTING__connectAllOutputs);
|
routing_connectAllOutputs = lilv_new_uri(world, LV2_ROUTING__connectAllOutputs);
|
||||||
@ -3616,6 +3618,7 @@ LV2World::~LV2World()
|
|||||||
lilv_node_free(lv2_integer);
|
lilv_node_free(lv2_integer);
|
||||||
lilv_node_free(lv2_isSideChain);
|
lilv_node_free(lv2_isSideChain);
|
||||||
lilv_node_free(lv2_inPlaceBroken);
|
lilv_node_free(lv2_inPlaceBroken);
|
||||||
|
lilv_node_free(lv2_connectionOptional);
|
||||||
lilv_node_free(lv2_OutputPort);
|
lilv_node_free(lv2_OutputPort);
|
||||||
lilv_node_free(lv2_InputPort);
|
lilv_node_free(lv2_InputPort);
|
||||||
lilv_node_free(lv2_ControlPort);
|
lilv_node_free(lv2_ControlPort);
|
||||||
@ -3971,7 +3974,7 @@ LV2PluginInfo::discover (boost::function <void (std::string const&, PluginScanLo
|
|||||||
count_ctrl_out++;
|
count_ctrl_out++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!lilv_port_is_a (p, port, world.lv2_AudioPort)) {
|
else if (!lilv_port_is_a(p, port, world.lv2_AudioPort) && !lilv_port_has_property(p, port, world.lv2_connectionOptional)) {
|
||||||
err = 1;
|
err = 1;
|
||||||
LilvNode* name = lilv_port_get_name(p, port);
|
LilvNode* name = lilv_port_get_name(p, port);
|
||||||
cb (uri, PluginScanLogEntry::Error, string_compose (_("Port %1 ('%2') has no known data type"), i, lilv_node_as_string (name)), false);
|
cb (uri, PluginScanLogEntry::Error, string_compose (_("Port %1 ('%2') has no known data type"), i, lilv_node_as_string (name)), false);
|
||||||
|
Loading…
Reference in New Issue
Block a user