WebSockets: add checks for VCA stripables
Also include VCAs when sending strip descriptions
This commit is contained in:
parent
cc08a2d945
commit
68463cb591
@ -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 ()
|
||||
|
@ -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 (processor) {
|
||||
boost::shared_ptr<PluginInsert> insert =
|
||||
boost::static_pointer_cast<PluginInsert> (processor);
|
||||
if ((strip->presentation_info ().flags () & ARDOUR::PresentationInfo::VCA) == 0) {
|
||||
boost::shared_ptr<Route> route = boost::dynamic_pointer_cast<Route> (strip);
|
||||
|
||||
if (insert) {
|
||||
return insert;
|
||||
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 (insert) {
|
||||
return insert;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user