diff --git a/libs/surfaces/websockets/dispatcher.cc b/libs/surfaces/websockets/dispatcher.cc index e4dec90f72..c2c315edce 100644 --- a/libs/surfaces/websockets/dispatcher.cc +++ b/libs/surfaces/websockets/dispatcher.cc @@ -65,20 +65,17 @@ WebsocketsDispatcher::update_all_nodes (Client client) ValueVector strip_desc = ValueVector (); strip_desc.push_back (strip.name ()); - strip_desc.push_back (strip.is_vca ()); + strip_desc.push_back (strip.has_pan ()); update (client, Node::strip_description, strip_addr, strip_desc); update (client, Node::strip_gain, strip_id, strip.gain ()); update (client, Node::strip_mute, strip_id, strip.mute ()); - // Pan and plugins not available in VCAs - if (strip.is_vca ()) { - continue; + if (strip.has_pan ()) { + update (client, Node::strip_pan, strip_id, strip.pan ()); } - update (client, Node::strip_pan, strip_id, strip.pan ()); - for (ArdourMixerStrip::PluginMap::iterator it = strip.plugins ().begin (); it != strip.plugins ().end (); ++it) { uint32_t plugin_id = it->first; boost::shared_ptr insert = it->second->insert (); diff --git a/libs/surfaces/websockets/mixer.cc b/libs/surfaces/websockets/mixer.cc index 9ee9c1fbd2..983450917e 100644 --- a/libs/surfaces/websockets/mixer.cc +++ b/libs/surfaces/websockets/mixer.cc @@ -121,11 +121,6 @@ ArdourMixerPlugin::param_value (boost::shared_ptr con ArdourMixerStrip::ArdourMixerStrip (boost::shared_ptr stripable, PBD::EventLoop* event_loop) : _stripable (stripable) { - if (is_vca ()) { - /* no plugins to handle */ - return; - } - boost::shared_ptr route = boost::dynamic_pointer_cast (_stripable); if (!route) { @@ -188,6 +183,12 @@ ArdourMixerStrip::set_gain (double db) _stripable->gain_control ()->set_value (from_db (db), PBD::Controllable::NoGroup); } +bool +ArdourMixerStrip::has_pan () const +{ + return _stripable->pan_azimuth_control () != 0; +} + double ArdourMixerStrip::pan () const { @@ -224,12 +225,6 @@ ArdourMixerStrip::set_mute (bool mute) _stripable->mute_control ()->set_value (mute ? 1.0 : 0.0, PBD::Controllable::NoGroup); } -bool -ArdourMixerStrip::is_vca () const -{ - return _stripable->presentation_info ().flags () & ARDOUR::PresentationInfo::VCA; -} - float ArdourMixerStrip::meter_level_db () const { diff --git a/libs/surfaces/websockets/mixer.h b/libs/surfaces/websockets/mixer.h index a3d219961e..43a7d75727 100644 --- a/libs/surfaces/websockets/mixer.h +++ b/libs/surfaces/websockets/mixer.h @@ -83,14 +83,13 @@ public: double gain () const; void set_gain (double); + bool has_pan () const; double pan () const; void set_pan (double); bool mute () const; void set_mute (bool); - bool is_vca () const; - std::string name () const; float meter_level_db () const; diff --git a/share/web_surfaces/builtin/mixer/js/main.js b/share/web_surfaces/builtin/mixer/js/main.js index 05478f4903..bcd7180cb5 100644 --- a/share/web_surfaces/builtin/mixer/js/main.js +++ b/share/web_surfaces/builtin/mixer/js/main.js @@ -88,8 +88,9 @@ import { createRootContainer, Container, Dialog, Label, Button, Toggle, plugins.classList.add('strip-plugins'); plugins.appendTo(container); - if (strip.isVca || (strip.plugins.length == 0)) { + if (strip.plugins.length == 0) { plugins.classList.add('disabled'); + plugins.element.style.visibility = 'hidden'; } else { plugins.callback = () => openPlugins (strip); } @@ -97,8 +98,10 @@ import { createRootContainer, Container, Dialog, Label, Button, Toggle, const pan = new PanKnob(); pan.appendTo(container); - if (!strip.isVca) { + if (strip.hasPan) { pan.bindTo(strip, 'pan'); + } else { + pan.element.style.visibility = 'hidden'; } const mute = new Toggle(); @@ -123,12 +126,6 @@ import { createRootContainer, Container, Dialog, Label, Button, Toggle, label.text = strip.name; label.classList.add('strip-label'); label.appendTo(container); - - if (strip.isVca) { - // hide plugins and pan keeping layout - pan.element.style.visibility = 'hidden'; - plugins.element.style.visibility = 'hidden'; - } } function openPlugins (strip) { diff --git a/share/web_surfaces/shared/components/strip.js b/share/web_surfaces/shared/components/strip.js index 203822bd94..157bfb0fb8 100644 --- a/share/web_surfaces/shared/components/strip.js +++ b/share/web_surfaces/shared/components/strip.js @@ -33,7 +33,7 @@ export default class Strip extends AddressableComponent { super(parent, addr); this._plugins = {}; this._name = desc[0]; - this._isVca = desc[1]; + this._hasPan = desc[1]; this._meter = 0; this._gain = 0; this._pan = 0; @@ -48,8 +48,8 @@ export default class Strip extends AddressableComponent { return this._name; } - get isVca () { - return this._isVca; + get hasPan () { + return this._hasPan; } get meter () {