summaryrefslogtreecommitdiff
path: root/libs/surfaces
diff options
context:
space:
mode:
authorLuciano Iam <lucianito@gmail.com>2020-04-21 15:18:23 +0200
committerLuciano Iam <lucianito@gmail.com>2020-04-21 15:53:27 +0200
commit68463cb591618a2d4c8087d21b64c9c3314ae985 (patch)
treeef63c22118bef8008462ed55747e8849f507137c /libs/surfaces
parentcc08a2d945568fc83cdf03d228bd20c3e6cccc02 (diff)
WebSockets: add checks for VCA stripables
Also include VCAs when sending strip descriptions
Diffstat (limited to 'libs/surfaces')
-rw-r--r--libs/surfaces/websockets/dispatcher.cc15
-rw-r--r--libs/surfaces/websockets/strips.cc25
2 files changed, 25 insertions, 15 deletions
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<Stripable> strip = strips ().nth_strip (strip_n);
- boost::shared_ptr<Route> route = boost::dynamic_pointer_cast<Route> (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> route = boost::dynamic_pointer_cast<Route> (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<PluginInsert> 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<ARDOUR::AutomationControl> c
boost::shared_ptr<PluginInsert>
ArdourStrips::strip_plugin_insert (uint32_t strip_n, uint32_t plugin_n) const
{
- boost::shared_ptr<Stripable> strip = nth_strip (strip_n);
- boost::shared_ptr<Route> route = boost::dynamic_pointer_cast<Route> (strip);
- if (!route) {
- return boost::shared_ptr<PluginInsert> ();
- }
- boost::shared_ptr<Processor> processor = route->nth_plugin (plugin_n);
+ boost::shared_ptr<Stripable> strip = nth_strip (strip_n);
+
+ if ((strip->presentation_info ().flags () & ARDOUR::PresentationInfo::VCA) == 0) {
+ boost::shared_ptr<Route> route = boost::dynamic_pointer_cast<Route> (strip);
+
+ if (route) {
+ boost::shared_ptr<Processor> processor = route->nth_plugin (plugin_n);
- if (processor) {
- boost::shared_ptr<PluginInsert> insert =
- boost::static_pointer_cast<PluginInsert> (processor);
+ if (processor) {
+ boost::shared_ptr<PluginInsert> insert =
+ boost::static_pointer_cast<PluginInsert> (processor);
- if (insert) {
- return insert;
+ if (insert) {
+ return insert;
+ }
+ }
}
}