From 68463cb591618a2d4c8087d21b64c9c3314ae985 Mon Sep 17 00:00:00 2001 From: Luciano Iam Date: Tue, 21 Apr 2020 15:18:23 +0200 Subject: WebSockets: add checks for VCA stripables Also include VCAs when sending strip descriptions --- libs/surfaces/websockets/dispatcher.cc | 15 +++++++++++---- libs/surfaces/websockets/strips.cc | 25 ++++++++++++++----------- 2 files changed, 25 insertions(+), 15 deletions(-) (limited to 'libs/surfaces') diff --git a/libs/surfaces/websockets/dispatcher.cc b/libs/surfaces/websockets/dispatcher.cc index 15c502476d..d2b99be1a0 100644 --- a/libs/surfaces/websockets/dispatcher.cc +++ b/libs/surfaces/websockets/dispatcher.cc @@ -62,15 +62,22 @@ WebsocketsDispatcher::update_all_nodes (Client client) for (uint32_t strip_n = 0; strip_n < strips ().strip_count (); ++strip_n) { boost::shared_ptr strip = strips ().nth_strip (strip_n); - boost::shared_ptr route = boost::dynamic_pointer_cast (strip); + + update (client, Node::strip_description, strip_n, strip->name ()); + update (client, Node::strip_gain, strip_n, strips ().strip_gain (strip_n)); + update (client, Node::strip_mute, strip_n, strips ().strip_mute (strip_n)); + + // Pan and plugins not available in VCAs + if ((strip->presentation_info ().flags () & ARDOUR::PresentationInfo::VCA)) { + continue; + } + + boost::shared_ptr route = boost::dynamic_pointer_cast (strip); if (!route) { continue; } - update (client, Node::strip_description, strip_n, strip->name ()); - update (client, Node::strip_gain, strip_n, strips ().strip_gain (strip_n)); update (client, Node::strip_pan, strip_n, strips ().strip_pan (strip_n)); - update (client, Node::strip_mute, strip_n, strips ().strip_mute (strip_n)); for (uint32_t plugin_n = 0;; ++plugin_n) { boost::shared_ptr insert = strips () diff --git a/libs/surfaces/websockets/strips.cc b/libs/surfaces/websockets/strips.cc index e9b81d2b55..dbace4a18f 100644 --- a/libs/surfaces/websockets/strips.cc +++ b/libs/surfaces/websockets/strips.cc @@ -199,19 +199,22 @@ ArdourStrips::plugin_param_value (boost::shared_ptr c boost::shared_ptr ArdourStrips::strip_plugin_insert (uint32_t strip_n, uint32_t plugin_n) const { - boost::shared_ptr strip = nth_strip (strip_n); - boost::shared_ptr route = boost::dynamic_pointer_cast (strip); - if (!route) { - return boost::shared_ptr (); - } - boost::shared_ptr processor = route->nth_plugin (plugin_n); + boost::shared_ptr strip = nth_strip (strip_n); + + if ((strip->presentation_info ().flags () & ARDOUR::PresentationInfo::VCA) == 0) { + boost::shared_ptr route = boost::dynamic_pointer_cast (strip); + + if (route) { + boost::shared_ptr processor = route->nth_plugin (plugin_n); - if (processor) { - boost::shared_ptr insert = - boost::static_pointer_cast (processor); + if (processor) { + boost::shared_ptr insert = + boost::static_pointer_cast (processor); - if (insert) { - return insert; + if (insert) { + return insert; + } + } } } -- cgit v1.2.3