Update of /cvsroot/audacity/audacity-src/src
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv13039

Modified Files:
        Benchmark.cpp 
Log Message:
Turn off clip movement and fix dirmanager deletion

Index: Benchmark.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Benchmark.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- Benchmark.cpp       10 Apr 2007 02:21:45 -0000      1.23
+++ Benchmark.cpp       29 May 2007 04:45:30 -0000      1.24
@@ -37,6 +37,7 @@
 #include "Project.h"
 #include "WaveTrack.h"
 #include "Sequence.h"
+#include "Prefs.h"
 
 #include "FileDialog.h"
 
@@ -330,6 +331,10 @@
       return;
    }
 
+   bool editClipCanMove = true;
+   gPrefs->Read(wxT("/GUI/EditClipCanMove"), &editClipCanMove);
+   gPrefs->Write(wxT("/GUI/EditClipCanMove"), false);
+
    Sequence::SetMaxDiskBlockSize(blockSize * 1024);
 
    wxBusyCursor busy;
@@ -425,7 +430,7 @@
 
       t->Paste(double (y0 * scale), tmp);
 
-      if (t->GetClipByIndex(0)->GetSequence()->GetNumSamples() != 
(sampleCount)len * scale) {
+      if (t->GetClipByIndex(0)->GetSequence()->GetNumSamples() != 
(sampleCount) len * scale) {
          Printf(wxT("Trial %d\n"), z);
          Printf(wxT("Expected len %d, track len %d.\n"), len * scale,
                 t->GetClipByIndex(0)->GetSequence()->GetNumSamples());
@@ -443,8 +448,6 @@
       // Paste
       for (i = 0; i < xlen; i++)
          small1[y0 + i] = small2[i];
-
-      delete tmp;
    }
 
    elapsed = timer.Time();
@@ -513,33 +516,28 @@
           wxT("simultaneous tracks that could be played at once: %.1f\n"),
           (len*scale/44100.0)/(elapsed/1000.0));
 
-   delete t;
-
-   delete[]small1;
-   delete[]small2;
-   delete[]block;
-
-   delete fact;
-   delete d;
-
-   Sequence::SetMaxDiskBlockSize(1048576);
-   HoldPrint(false);
-
-   return;
+   goto success;
 
  fail:
    Printf(wxT("TEST FAILED!!!\n"));
 
+ success:
+   if (tmp)
+      delete tmp;
+
    delete t;
 
    delete[]small1;
    delete[]small2;
    delete[]block;
 
-   delete d;
+   delete fact;
+   d->Deref();
 
    Sequence::SetMaxDiskBlockSize(1048576);
    HoldPrint(false);
+
+   gPrefs->Write(wxT("/GUI/EditClipCanMove"), editClipCanMove);
 }
 
 


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to