make tape tracks draw something.
authorRobin Gareus <robin@gareus.org>
Tue, 28 Apr 2015 14:07:57 +0000 (16:07 +0200)
committerRobin Gareus <robin@gareus.org>
Tue, 28 Apr 2015 14:08:20 +0000 (16:08 +0200)
gtk2_ardour/tape_region_view.cc

index f40ccb60142ac30dcef59f915494b1ef1a9d3860..2d71bdf5ab90c3020bb33a0fc9dbb6cc6a60b11d 100644 (file)
@@ -82,12 +82,23 @@ void
 TapeAudioRegionView::update (uint32_t /*n*/)
 {
        /* check that all waves are build and ready */
-
        if (!tmp_waves.empty()) {
                return;
        }
 
        ENSURE_GUI_THREAD (*this, &TapeAudioRegionView::update, n);
        // CAIROCANVAS
-       // waves[n]->rebuild ();
+
+       /* this is a quick hack to draw something (abuse gain_changed to force
+        * an image-cache invalidation.
+        *
+        * TODO: ArdourCanvas::WaveView needs an API to look up the specific channel "n"
+        * and a special case to not only invalidate the cache but re-expose the
+        * waveform. e.g.
+        *
+        * waves[m]->rebuild();  // where 'm' corresponds to channel 'n'.
+        */
+       for (uint32_t i = 0; i < waves.size(); ++i) {
+               waves[i]->gain_changed ();
+       }
 }