X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=libs%2Fsurfaces%2Fosc%2Fosc_cue_observer.cc;h=7d027b4f188eb0464972b2bc1b06468936e98de0;hb=b694ee9e534441724977157e5bc226d9a2d8fb44;hp=11d62073cf8fd4e3746d05b6c399dacbbe348146;hpb=3ab4a1d1475db9fb8a65fdb8e885b530b742dfc1;p=ardour.git diff --git a/libs/surfaces/osc/osc_cue_observer.cc b/libs/surfaces/osc/osc_cue_observer.cc index 11d62073cf..7d027b4f18 100644 --- a/libs/surfaces/osc/osc_cue_observer.cc +++ b/libs/surfaces/osc/osc_cue_observer.cc @@ -49,6 +49,7 @@ OSCCueObserver::OSCCueObserver (boost::shared_ptr s, std::vectormute_control()); gain_timeout.push_back (0); + _last_gain.push_back (0.0); _strip->gain_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCCueObserver::send_gain_message, this, 0, _strip->gain_control()), OSC::instance()); send_gain_message (0, _strip->gain_control()); @@ -132,6 +133,7 @@ OSCCueObserver::send_init() if (send->gain_control()) { gain_timeout.push_back (0); + _last_gain.push_back (0.0); send->gain_control()->Changed.connect (send_connections, MISSING_INVALIDATOR, boost::bind (&OSCCueObserver::send_gain_message, this, i + 1, send->gain_control()), OSC::instance()); send_gain_message (i + 1, send->gain_control()); } @@ -213,6 +215,11 @@ OSCCueObserver::text_with_id (string path, uint32_t id, string val) void OSCCueObserver::send_gain_message (uint32_t id, boost::shared_ptr controllable) { + if (_last_gain[id] != controllable->get_value()) { + _last_gain[id] = controllable->get_value(); + } else { + return; + } string path = "/cue"; if (id) { path = "/cue/send";