}
// Compressor
if (_strip->comp_enable_controllable ()) {
- _strip->comp_enable_controllable ()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/comp_enable"), _strip->comp_enable_controllable()), OSC::instance());
- change_message ("/select/comp_enable", _strip->comp_enable_controllable());
+ _strip->comp_enable_controllable ()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::enable_message, this, X_("/select/comp_enable"), _strip->comp_enable_controllable()), OSC::instance());
+ enable_message ("/select/comp_enable", _strip->comp_enable_controllable());
}
if (_strip->comp_threshold_controllable ()) {
_strip->comp_threshold_controllable ()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/comp_threshold"), _strip->comp_threshold_controllable()), OSC::instance());
}
if (_strip->send_enable_controllable (nsends)) {
- _strip->send_enable_controllable(nsends)->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message_with_id, this, X_("/select/send_enable"), nsends + 1, _strip->send_enable_controllable(nsends)), OSC::instance());
- change_message_with_id ("/select/send_enable", nsends + 1, _strip->send_enable_controllable(nsends));
+ _strip->send_enable_controllable(nsends)->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::enable_message_with_id, this, X_("/select/send_enable"), nsends + 1, _strip->send_enable_controllable(nsends)), OSC::instance());
+ enable_message_with_id ("/select/send_enable", nsends + 1, _strip->send_enable_controllable(nsends));
sends = true;
} else if (sends) {
// not used by Ardour, just mixbus so in Ardour always true
lo_message_free (msg);
}
+void
+OSCSelectObserver::enable_message (string path, boost::shared_ptr<Controllable> controllable)
+{
+ float val = controllable->get_value();
+ if (val) {
+ clear_strip (path, 1);
+ } else {
+ clear_strip (path, 0);
+ }
+
+}
+
void
OSCSelectObserver::change_message_with_id (string path, uint32_t id, boost::shared_ptr<Controllable> controllable)
{
lo_message_free (msg);
}
+void
+OSCSelectObserver::enable_message_with_id (string path, uint32_t id, boost::shared_ptr<Controllable> controllable)
+{
+ float val = controllable->get_value();
+ if (val) {
+ clear_strip_with_id (path, id, 1);
+ } else {
+ clear_strip_with_id (path, id, 0);
+ }
+}
+
void
OSCSelectObserver::text_message (string path, std::string text)
{
change_message ("/select/eq_hpf", _strip->eq_hpf_controllable());
}
if (_strip->eq_enable_controllable ()) {
- _strip->eq_enable_controllable ()->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/eq_enable"), _strip->eq_enable_controllable()), OSC::instance());
- change_message ("/select/eq_enable", _strip->eq_enable_controllable());
+ _strip->eq_enable_controllable ()->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::enable_message, this, X_("/select/eq_enable"), _strip->eq_enable_controllable()), OSC::instance());
+ enable_message ("/select/eq_enable", _strip->eq_enable_controllable());
}
uint32_t eq_bands = _strip->eq_band_cnt ();
void name_changed (const PBD::PropertyChange& what_changed);
void change_message (std::string path, boost::shared_ptr<PBD::Controllable> controllable);
+ void enable_message (std::string path, boost::shared_ptr<PBD::Controllable> controllable);
void comp_mode (void);
void change_message_with_id (std::string path, uint32_t id, boost::shared_ptr<PBD::Controllable> controllable);
+ void enable_message_with_id (std::string path, uint32_t id, boost::shared_ptr<PBD::Controllable> controllable);
void text_message (std::string path, std::string text);
void text_with_id (std::string path, uint32_t id, std::string name);
void monitor_status (boost::shared_ptr<PBD::Controllable> controllable);