diff options
author | Len Ovens <len@ovenwerks.net> | 2018-10-16 13:33:42 -0700 |
---|---|---|
committer | Len Ovens <len@ovenwerks.net> | 2018-10-16 13:56:52 -0700 |
commit | 87ab15c8625710cb1956a162457c93b245244b76 (patch) | |
tree | 2f636654dfd2c5897ceb5e3eaeab538d6b117491 /libs/surfaces/osc | |
parent | 8160fd1348af8ebadf87939cde80a5a4d1aa09e9 (diff) |
OSC: personal monitor send hidden follows aux hidden
Diffstat (limited to 'libs/surfaces/osc')
-rw-r--r-- | libs/surfaces/osc/osc.cc | 5 | ||||
-rw-r--r-- | libs/surfaces/osc/osc_cue_observer.cc | 18 | ||||
-rw-r--r-- | libs/surfaces/osc/osc_cue_observer.h | 2 |
3 files changed, 25 insertions, 0 deletions
diff --git a/libs/surfaces/osc/osc.cc b/libs/surfaces/osc/osc.cc index 8d17a06941..a5238fe748 100644 --- a/libs/surfaces/osc/osc.cc +++ b/libs/surfaces/osc/osc.cc @@ -6542,6 +6542,11 @@ OSC::cue_new_send (string rt_name, lo_message msg) // create send boost::shared_ptr<Processor> loc = rt_send->before_processor_for_placement (PreFader); rt_send->add_aux_send (aux, loc); + boost::shared_ptr<Send> snd = rt_send->internal_send_for (aux); + if (snd->gain_control() && aux->is_hidden ()) { + snd->set_display_to_user (false); + rt_send->processors_changed (RouteProcessorChange ()); /* EMIT SIGNAL */ + } session->dirty (); return 0; } else { diff --git a/libs/surfaces/osc/osc_cue_observer.cc b/libs/surfaces/osc/osc_cue_observer.cc index 115fb66024..3a76e6fb71 100644 --- a/libs/surfaces/osc/osc_cue_observer.cc +++ b/libs/surfaces/osc/osc_cue_observer.cc @@ -100,6 +100,7 @@ OSCCueObserver::refresh_strip (boost::shared_ptr<ARDOUR::Stripable> new_strip, S send_gain_message (0, _strip->gain_control(), true); send_init (); + hidden_changed (); tick_enable = true; tick (); @@ -204,6 +205,9 @@ OSCCueObserver::send_restart () void OSCCueObserver::name_changed (const PBD::PropertyChange& what_changed, uint32_t id) { + if (_hidden != _strip->is_hidden ()) { + hidden_changed (); + } if (!what_changed.contains (ARDOUR::Properties::name)) { return; } @@ -219,6 +223,20 @@ OSCCueObserver::name_changed (const PBD::PropertyChange& what_changed, uint32_t } void +OSCCueObserver::hidden_changed () +{ + _hidden = _strip->is_hidden (); + for (uint32_t i = 0; i < sends.size(); i++) { + boost::shared_ptr<Route> r = boost::dynamic_pointer_cast<Route> (sends[i]); + boost::shared_ptr<Send> send = r->internal_send_for (boost::dynamic_pointer_cast<Route> (_strip)); + if (_hidden == send->display_to_user ()) { + send->set_display_to_user (!_hidden); + r->processors_changed (RouteProcessorChange ()); /* EMIT SIGNAL */ + } + } +} + +void OSCCueObserver::send_change_message (string path, uint32_t id, boost::shared_ptr<Controllable> controllable) { if (id) { diff --git a/libs/surfaces/osc/osc_cue_observer.h b/libs/surfaces/osc/osc_cue_observer.h index 3dfe49472d..f85eb1e3d9 100644 --- a/libs/surfaces/osc/osc_cue_observer.h +++ b/libs/surfaces/osc/osc_cue_observer.h @@ -57,11 +57,13 @@ class OSCCueObserver ArdourSurface::OSC::OSCSurface* sur; float _last_meter; float _last_signal; + bool _hidden; std::vector<uint32_t> gain_timeout; bool tick_enable; std::vector<float> _last_gain; void name_changed (const PBD::PropertyChange& what_changed, uint32_t id); + void hidden_changed (void); void send_change_message (std::string path, uint32_t id, boost::shared_ptr<PBD::Controllable> controllable); void send_gain_message (uint32_t id, boost::shared_ptr<PBD::Controllable> controllable, bool force); void send_enabled_message (std::string path, uint32_t id, boost::shared_ptr<ARDOUR::Processor> proc); |