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

Modified Files:
        Nyquist.cpp 
Log Message:
Perform a nearly full save/restore of the Nyquist/Lisp symbols to provide a 
consistent environment for effects.

Free excess memory segments during cleanup processing to reduce memory usage 
after an effect has been run.  

Ensure certain global Lisp variables are always set to protect against carrying 
rogue value from execution to execution.

Make all private variables/functions local.



Index: Nyquist.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/effects/nyquist/Nyquist.cpp,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- Nyquist.cpp 10 Feb 2009 16:04:47 -0000      1.71
+++ Nyquist.cpp 24 Feb 2009 05:35:47 -0000      1.72
@@ -677,12 +677,16 @@
    nyx_set_os_callback(StaticOSCallback, (void *)this);
    nyx_capture_output(StaticOutputCallback, (void *)this);
 
-   if( !( mFlags & INSERT_EFFECT ) )
+   if (!(mFlags & INSERT_EFFECT)) {
+      nyx_set_audio_params(mCurTrack[0]->GetRate(), mCurLen);
+
       nyx_set_input_audio(StaticGetCallback, (void *)this,
                           mCurNumChannels,
                           mCurLen, mCurTrack[0]->GetRate());
-   else
-      nyx_set_audio_params( mCurTrack[0]->GetRate() );
+   }
+   else {
+      nyx_set_audio_params(mCurTrack[0]->GetRate(), 0);
+   }
 
    wxString cmd;
 
@@ -864,9 +868,9 @@
       mOutputTrack[i] = NULL;
    }
 
-   nyx_capture_output(StaticOutputCallback, (void *)NULL);
+   nyx_capture_output(NULL, (void *)NULL);
 
-   nyx_set_os_callback(StaticOSCallback, (void *)NULL);
+   nyx_set_os_callback(NULL, (void *)NULL);
 
    nyx_cleanup();
 


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to