+ in_line = feedback[2];
+ uint32_t sid = sur->bank + ssid - 2;
+ uint32_t not_ready = 0;
+ if (sur->linkset) {
+ not_ready = _osc.link_sets[sur->linkset].not_ready;
+ }
+ if (not_ready) {
+ set_link_ready (not_ready);
+ } else if (sid >= sur->strips.size ()) {
+ // this _should_ only occure if the number of strips is less than banksize
+ _strip = boost::shared_ptr<ARDOUR::Stripable>();
+ clear_strip ();
+ } else {
+ _strip = sur->strips[sid];
+ refresh_strip (_strip, true);
+ }
+ if (sur->expand_enable) {
+ set_expand (sur->expand);
+ } else {
+ set_expand (0);
+ }
+}
+
+OSCRouteObserver::~OSCRouteObserver ()
+{
+ _init = true;
+ strip_connections.drop_connections ();
+
+ lo_address_free (addr);
+}
+
+void
+OSCRouteObserver::no_strip ()
+{
+ // This gets called on drop references
+ _init = true;
+
+ strip_connections.drop_connections ();
+ /*
+ * The strip will sit idle at this point doing nothing until
+ * the surface has recalculated it's strip list and then calls
+ * refresh_strip. Otherwise refresh strip will get a strip address
+ * that does not exist... Crash
+ */
+ }
+
+void
+OSCRouteObserver::refresh_strip (boost::shared_ptr<ARDOUR::Stripable> new_strip, bool force)
+{
+ _init = true;
+ if (_tick_busy) {
+ Glib::usleep(100); // let tick finish
+ }
+ _last_gain =-1.0;
+ _last_trim =-1.0;
+
+ send_select_status (ARDOUR::Properties::selected);
+
+ if ((new_strip == _strip) && !force) {
+ // no change don't send feedback
+ _init = false;
+ return;
+ }
+ strip_connections.drop_connections ();
+ _strip = new_strip;
+ if (!_strip) {
+ // this strip is blank and should be cleared
+ clear_strip ();
+ _init = false;
+ return;
+ }
+ _strip->DropReferences.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::no_strip, this), OSC::instance());