OSC: personal monitor send hidden follows aux hidden

This commit is contained in:
Len Ovens 2018-10-16 13:33:42 -07:00
parent 8160fd1348
commit 87ab15c862
6 changed files with 35 additions and 1 deletions

View File

@ -43,6 +43,7 @@ public:
uint32_t bit_slot() const { return _bitslot; }
bool display_to_user() const;
bool is_aux () const { return _role == Aux; }
boost::shared_ptr<Amp> amp() const { return _amp; }
boost::shared_ptr<PeakMeter> meter() const { return _meter; }

View File

@ -4662,9 +4662,13 @@ Route::setup_invisible_processors ()
/* find visible processors */
for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
boost::shared_ptr<Send> auxsnd = boost::dynamic_pointer_cast<Send> ((*i));
if ((*i)->display_to_user ()) {
new_processors.push_back (*i);
}
else if (auxsnd && auxsnd->is_aux ()) {
new_processors.push_back (*i);
}
}
/* find the amp */
@ -5642,7 +5646,7 @@ Route::send_pan_azi_controllable (uint32_t n) const
}
}
#endif
return boost::shared_ptr<AutomationControl>();
}

View File

@ -101,6 +101,8 @@ Send::Send (Session& s, boost::shared_ptr<Pannable> p, boost::shared_ptr<MuteMas
_send_delay.reset (new DelayLine (_session, "Send-" + name()));
_thru_delay.reset (new DelayLine (_session, "Thru-" + name()));
_display_to_user = true;
if (panner_shell()) {
panner_shell()->Changed.connect_same_thread (*this, boost::bind (&Send::panshell_changed, this));
}
@ -452,6 +454,8 @@ Send::display_to_user () const
if (_role == Listen) {
/* don't make the monitor/control/listen send visible */
return false;
} else if (_role == Aux) {
return _display_to_user;
}
return true;

View File

@ -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 {

View File

@ -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;
}
@ -218,6 +222,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)
{

View File

@ -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);