summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorLen Ovens <len@ovenwerks.net>2017-10-24 12:44:09 -0700
committerLen Ovens <len@ovenwerks.net>2017-10-24 12:44:09 -0700
commit7aacd5d71a488bdbce30c73b5b6f1527a9a6e19a (patch)
treeffd5637017448bb87c44e5290217af99d0facbd0 /libs
parentd6a3db1ac7651f24eaba1c0095757e0c4b09659d (diff)
OSC: fix add and remove tracks to update without bank change.
Diffstat (limited to 'libs')
-rw-r--r--libs/surfaces/osc/osc.cc9
-rw-r--r--libs/surfaces/osc/osc_route_observer.cc7
2 files changed, 9 insertions, 7 deletions
diff --git a/libs/surfaces/osc/osc.cc b/libs/surfaces/osc/osc.cc
index c57576e32d..32a7cd5991 100644
--- a/libs/surfaces/osc/osc.cc
+++ b/libs/surfaces/osc/osc.cc
@@ -119,7 +119,6 @@ OSC::~OSC()
tick = false;
stop ();
tear_down_gui ();
- std::cout << "OSC stopped.\n";
_instance = 0;
}
@@ -1695,6 +1694,8 @@ OSC::global_feedback (OSCSurface* sur)
void
OSC::strip_feedback (OSCSurface* sur, bool new_bank_size)
{
+ sur->strips = get_sorted_stripables(sur->strip_types, sur->cue);
+ sur->nstrips = sur->strips.size();
if (new_bank_size || (!sur->feedback[0] && !sur->feedback[1])) {
// delete old observers
for (uint32_t i = 0; i < sur->observers.size(); i++) {
@@ -1706,8 +1707,6 @@ OSC::strip_feedback (OSCSurface* sur, bool new_bank_size)
sur->observers.clear();
// get freash striplist - just in case
- sur->strips = get_sorted_stripables(sur->strip_types, sur->cue);
- sur->nstrips = sur->strips.size();
uint32_t bank_size = sur->bank_size;
if (!bank_size) {
bank_size = sur->nstrips;
@@ -1788,9 +1787,7 @@ OSC::_recalcbanks ()
lo_send_message (addr, "/strip/list", reply);
lo_message_free (reply);
} else {
- for (uint32_t i = 0; i < sur->observers.size(); i++) {
- sur->observers[i]->refresh_strip (false);
- }
+ strip_feedback (sur, false);
}
}
}
diff --git a/libs/surfaces/osc/osc_route_observer.cc b/libs/surfaces/osc/osc_route_observer.cc
index 1d3921066c..9b78438694 100644
--- a/libs/surfaces/osc/osc_route_observer.cc
+++ b/libs/surfaces/osc/osc_route_observer.cc
@@ -81,10 +81,15 @@ OSCRouteObserver::refresh_strip (bool force)
gainmode = sur->gainmode;
feedback = sur->feedback;
in_line = feedback[2];
+ _last_gain =-1.0;
+ _last_trim =-1.0;
uint32_t sid = sur->bank + ssid - 2;
if (sid >= sur->strips.size ()) {
// this _should_ only occure if the number of strips is less than banksize
- clear_strip ();
+ if (_strip) {
+ _strip = 0;
+ clear_strip ();
+ }
return;
}
// future