diff options
author | David Robillard <d@drobilla.net> | 2014-10-31 23:48:27 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-11-02 02:10:24 -0500 |
commit | 6dfb11c2d08201f1a27818955707590b762f5a40 (patch) | |
tree | a0ba48815d3a40bb8491b940d97d3c2330cb19f3 /libs/ardour/lv2_plugin.cc | |
parent | bd6ba1717ef43bd4399b96a03bbb576eab55b9a2 (diff) |
Move ParameterDescriptor from Plugin to its own header.
This fixes circular dependency issues that arise when using ParameterDescriptor more widely.
Diffstat (limited to 'libs/ardour/lv2_plugin.cc')
-rw-r--r-- | libs/ardour/lv2_plugin.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc index ac4e213851..4f41b51d1b 100644 --- a/libs/ardour/lv2_plugin.cc +++ b/libs/ardour/lv2_plugin.cc @@ -1224,6 +1224,8 @@ static void forge_variant(LV2_Atom_Forge* forge, const Variant& value) { switch (value.type()) { + case Variant::VOID: + break; case Variant::BOOL: lv2_atom_forge_bool(forge, value.get_bool()); break; @@ -1286,6 +1288,9 @@ LV2Plugin::set_property(uint32_t key, const Variant& value) if (_patch_port_in_index == (uint32_t)-1) { error << "LV2: set_property called with unset patch_port_in_index" << endmsg; return; + } else if (value.type() == Variant::VOID) { + error << "LV2: set_property called with void value" << endmsg; + return; } // Set up forge to write to temporary buffer on the stack @@ -2085,18 +2090,18 @@ LV2Plugin::print_parameter(uint32_t param, char* buf, uint32_t len) const } } -boost::shared_ptr<Plugin::ScalePoints> +boost::shared_ptr<ScalePoints> LV2Plugin::get_scale_points(uint32_t port_index) const { const LilvPort* port = lilv_plugin_get_port_by_index(_impl->plugin, port_index); LilvScalePoints* points = lilv_port_get_scale_points(_impl->plugin, port); - boost::shared_ptr<Plugin::ScalePoints> ret; + boost::shared_ptr<ScalePoints> ret; if (!points) { return ret; } - ret = boost::shared_ptr<Plugin::ScalePoints>(new ScalePoints()); + ret = boost::shared_ptr<ScalePoints>(new ScalePoints()); LILV_FOREACH(scale_points, i, points) { const LilvScalePoint* p = lilv_scale_points_get(points, i); |