Update of /cvsroot/audacity/audacity-src/src
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv26900/src

Modified Files:
        Sequence.cpp TrackArtist.cpp 
Log Message:
Fix a couple things in clip-drawing routines that were causing envelope
assertions (and possibly a long hang or crash)


Index: Sequence.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Sequence.cpp,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- Sequence.cpp        8 Nov 2009 17:09:21 -0000       1.62
+++ Sequence.cpp        21 Nov 2009 17:15:04 -0000      1.63
@@ -1075,6 +1075,10 @@
    sampleCount s0 = where[0];
    sampleCount s1 = where[len];
 
+   // None of the samples asked for are in range. Abandon.
+   if (s0 >= mNumSamples)
+      return false;
+
    int divisor;
    if (samplesPerPixel >= 65536)
       divisor = 65536;

Index: TrackArtist.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/TrackArtist.cpp,v
retrieving revision 1.153
retrieving revision 1.154
diff -u -d -r1.153 -r1.154
--- TrackArtist.cpp     17 Sep 2009 16:56:19 -0000      1.153
+++ TrackArtist.cpp     21 Nov 2009 17:15:14 -0000      1.154
@@ -950,7 +950,8 @@
       
       xpos[s] = xx;
 
-      tt = buffer[s] * clip->GetEnvelope()->GetValueAtX(xx + r.x, r, h, pps);
+      // t0 + clip->GetOffset() is 'h' (the absolute time of the left edge) 
for 'r'.
+      tt = buffer[s] * clip->GetEnvelope()->GetValueAtX(xx + r.x, r, t0 + 
clip->GetOffset(), pps);
       if (mShowClipping && (tt <= -MAX_AUDIO || tt >= MAX_AUDIO)) {
          clipped[clipcnt++] = xx;
       }


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Audacity-cvs mailing list
Audacity-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to