mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-06 13:45:43 +01:00
WS: move VCA detection to mixer strip interface
Expose the wrapped Stripable the least as possible
This commit is contained in:
parent
e510c0cb75
commit
aa38491b7d
3 changed files with 11 additions and 10 deletions
|
|
@ -59,14 +59,12 @@ WebsocketsDispatcher::update_all_nodes (Client client)
|
|||
uint32_t strip_id = it->first;
|
||||
ArdourMixerStrip& strip = it->second;
|
||||
|
||||
bool is_vca = strip.stripable ()->presentation_info ().flags () & ARDOUR::PresentationInfo::VCA;
|
||||
|
||||
AddressVector strip_addr = AddressVector ();
|
||||
strip_addr.push_back (strip_id);
|
||||
|
||||
ValueVector strip_desc = ValueVector ();
|
||||
strip_desc.push_back (strip.name ());
|
||||
strip_desc.push_back (is_vca);
|
||||
strip_desc.push_back (strip.is_vca ());
|
||||
|
||||
update (client, Node::strip_description, strip_addr, strip_desc);
|
||||
|
||||
|
|
@ -74,12 +72,7 @@ WebsocketsDispatcher::update_all_nodes (Client client)
|
|||
update (client, Node::strip_mute, strip_id, strip.mute ());
|
||||
|
||||
// Pan and plugins not available in VCAs
|
||||
if (is_vca) {
|
||||
continue;
|
||||
}
|
||||
|
||||
boost::shared_ptr<Route> route = boost::dynamic_pointer_cast<Route> (strip.stripable ());
|
||||
if (!route) {
|
||||
if (strip.is_vca ()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ ArdourMixerStrip::ArdourMixerStrip (boost::shared_ptr<ARDOUR::Stripable> stripab
|
|||
: _stripable (stripable)
|
||||
, _connections (boost::shared_ptr<PBD::ScopedConnectionList> (new PBD::ScopedConnectionList()))
|
||||
{
|
||||
if (_stripable->presentation_info ().flags () & ARDOUR::PresentationInfo::VCA) {
|
||||
if (is_vca ()) {
|
||||
/* no plugins to handle */
|
||||
return;
|
||||
}
|
||||
|
|
@ -238,6 +238,12 @@ 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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -78,6 +78,8 @@ public:
|
|||
bool mute () const;
|
||||
void set_mute (bool);
|
||||
|
||||
bool is_vca () const;
|
||||
|
||||
std::string name () const;
|
||||
|
||||
float meter_level_db () const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue