Fix insane formatting (how did this even happen? copy paste from an email diff or...
[ardour.git] / gtk2_ardour / tape_region_view.cc
index 0cf50b87e635ad32da248ed9c48810c1695f3c43..21bc41800e107babcf88aa162c2c417610935792 100644 (file)
@@ -15,7 +15,6 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id$
 */
 
 #include <cmath>
@@ -54,7 +53,7 @@ TapeAudioRegionView::TapeAudioRegionView (ArdourCanvas::Group *parent, RouteTime
                                          double spu, 
                                          Gdk::Color& basic_color)
 
-       : AudioRegionView (parent, tv, r, spu, basic_color, 
+       : AudioRegionView (parent, tv, r, spu, basic_color, false,
                           TimeAxisViewItem::Visibility ((r->position() != 0) ? default_tape_visibility : 
                                                         TimeAxisViewItem::Visibility (default_tape_visibility|TimeAxisViewItem::HideFrameLeft)))
 {
@@ -63,12 +62,16 @@ TapeAudioRegionView::TapeAudioRegionView (ArdourCanvas::Group *parent, RouteTime
 void
 TapeAudioRegionView::init (Gdk::Color& basic_color, bool wfw)
 {
-       AudioRegionView::init(basic_color, wfw);
+       /* never wait for data: always just create the waves, connect once and then
+          we'll update whenever we need to.
+       */
+
+       AudioRegionView::init(basic_color, false);
 
        /* every time the wave data changes and peaks are ready, redraw */
        
        for (uint32_t n = 0; n < audio_region()->n_channels(); ++n) {
-               audio_region()->source(n)->PeaksReady.connect (bind (mem_fun(*this, &TapeAudioRegionView::update), n));
+               audio_region()->audio_source(n)->PeaksReady.connect (bind (mem_fun(*this, &TapeAudioRegionView::update), n));
        }
        
 }
@@ -97,5 +100,5 @@ void
 TapeAudioRegionView::set_frame_color ()
 {
        fill_opacity = 255;
-       TimeAxisViewItem::set_frame_color ();
+       AudioRegionView::set_frame_color ();
 }