diff --git a/libs/surfaces/osc/osc_cue_observer.cc b/libs/surfaces/osc/osc_cue_observer.cc index a4c86d2252..8300b2ff48 100644 --- a/libs/surfaces/osc/osc_cue_observer.cc +++ b/libs/surfaces/osc/osc_cue_observer.cc @@ -94,7 +94,7 @@ OSCCueObserver::refresh_strip (std::shared_ptr new_strip, Sor send_change_message (X_("/cue/mute"), 0, _strip->mute_control()); gain_timeout.push_back (0); - _last_gain.push_back (-1.0); + _last_gain[0] = -1; // unused _strip->gain_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, std::bind (&OSCCueObserver::send_gain_message, this, 0, _strip->gain_control(), false), OSC::instance()); send_gain_message (0, _strip->gain_control(), true); @@ -162,7 +162,7 @@ OSCCueObserver::send_init() if (send->gain_control()) { gain_timeout.push_back (0); - _last_gain.push_back (-1.0); + _last_gain[i + 1] = -1.0; send->gain_control()->Changed.connect (send_connections, MISSING_INVALIDATOR, std::bind (&OSCCueObserver::send_gain_message, this, i + 1, send->gain_control(), false), OSC::instance()); send_gain_message (i + 1, send->gain_control(), true); } diff --git a/libs/surfaces/osc/osc_cue_observer.h b/libs/surfaces/osc/osc_cue_observer.h index ecde92f30d..97baa31da4 100644 --- a/libs/surfaces/osc/osc_cue_observer.h +++ b/libs/surfaces/osc/osc_cue_observer.h @@ -61,7 +61,7 @@ class OSCCueObserver float _last_signal; std::vector gain_timeout; bool tick_enable; - std::vector _last_gain; + std::map _last_gain; void name_changed (const PBD::PropertyChange& what_changed, uint32_t id); void send_change_message (std::string path, uint32_t id, std::shared_ptr controllable);