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

Modified Files:
        Effect.cpp 
Log Message:
Added an event that is posted after the ondemand task is complete - before the 
last bit
of OnDemand diagonal lines wern't refreshing.

Changed the wavecache to take 'dirty' or invalid regions so we don't fetch each 
blockfile's summary data each time we force a redraw due to the blockfile being 
partially computed.

Fixed a bug that caussed the OD to stop loading when an effect was applied to 
the waveform.


Index: Effect.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/effects/Effect.cpp,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- Effect.cpp  4 Jun 2008 19:10:46 -0000       1.53
+++ Effect.cpp  22 Jun 2008 19:25:29 -0000      1.54
@@ -37,7 +37,7 @@
 #include "../Project.h"
 #include "../WaveTrack.h"
 #include "../widgets/ProgressDialog.h"
-
+#include "../ondemand/ODManager.h"
 //
 // public static methods
 //
@@ -165,6 +165,14 @@
       pOutWaveTrack = mFactory->DuplicateWaveTrack(*(WaveTrack*)pInWaveTrack);
       mOutputWaveTracks->Add(pOutWaveTrack);
       pInWaveTrack = (WaveTrack*)(iterIn.Next());
+      
+      //swap on demand tasks - they should now be processed on pOutWaveTrack. 
+      //need to undo this when the user hits cancel.    
+#ifdef EXPERIMENTAL_ONDEMAND      
+ //TODO: this is complicated because concurrent tasks/effects will write over 
the same blockfile.  Thus if the 
+//compute summary task goes last the effect will be overwritten.  we need a 
lot of mutexes.
+ //     ODManager::Instance()->ReplaceTaskWaveTrack(pInputTrack,pOutputTrack);
+#endif
    }
 }
 
@@ -198,6 +206,11 @@
                mTracks->Add(pOutWaveTrack);
                if (pTrack == pFirstTrack)
                   pFirstTrack = pOutWaveTrack; // We replaced the first track, 
so update stop condition.
+                  
+               //swap the wavecache track the ondemand task uses, since now 
the new one will be kept in the project
+#ifdef EXPERIMENTAL_ONDEMAND      
+               
ODManager::Instance()->ReplaceWaveTrack(pInWaveTrack,pOutWaveTrack);
+#endif
             }
             delete pInWaveTrack;
 
@@ -219,6 +232,8 @@
    {
       // Processing failed or was cancelled so throw away the processed tracks.
       mOutputWaveTracks->Clear(true); // true => delete the tracks
+      
+      //TODO:undo the non-gui ODTask transfer
    }
 }
 


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Audacity-cvs mailing list
Audacity-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to