Update of /cvsroot/audacity/audacity-src/src
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv24436
Modified Files:
Menus.cpp
Log Message:
Comment about (rare) endless loop (I couldn't figure it out) and fix memory
leak.
Index: Menus.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Menus.cpp,v
retrieving revision 1.448
retrieving revision 1.449
diff -u -d -r1.448 -r1.449
--- Menus.cpp 23 Mar 2009 09:39:33 -0000 1.448
+++ Menus.cpp 23 Mar 2009 10:24:16 -0000 1.449
@@ -3149,7 +3149,11 @@
Track *prev = NULL;
c = clipIter.First();
Track *first = c;
-
+
+ // LL: There is an endless loop here if you paste only non-wave track
+ // data, like midi data. Not sure exactly what this is supposed
+ // to do in that case, but it seems that it's making an
assumption
+ // that only wave data can be pasted.
while (!foundSrcTrack){
prev = c;
c = clipIter.Next();
@@ -3173,13 +3177,14 @@
while (n){
if (n->GetSelected() && n->GetKind()==Track::Wave){
if (c && c->GetKind() == Track::Wave){
- tmp = (WaveTrack*)c;
+ ((WaveTrack *)n)->HandlePaste(t0, (WaveTrack *)c);
}else{
tmp = mTrackFactory->NewWaveTrack(
((WaveTrack*)n)->GetSampleFormat(), ((WaveTrack*)n)->GetRate());
tmp->InsertSilence(0.0, srcLength);
tmp->Flush();
+ ((WaveTrack *)n)->HandlePaste(t0, tmp);
+ delete tmp;
}
- ((WaveTrack *)n)->HandlePaste(t0, tmp);
}
n = iter.Next();
}
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs