Update of /cvsroot/audacity/audacity-src/src/effects/vamp
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv31733/src/effects/vamp
Modified Files:
VampEffect.cpp
Log Message:
Fix hang when running Vamp plugin that does not report any preferred block size
Index: VampEffect.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/effects/vamp/VampEffect.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- VampEffect.cpp 16 Sep 2007 13:46:02 -0000 1.1
+++ VampEffect.cpp 18 Sep 2007 09:56:09 -0000 1.2
@@ -13,12 +13,15 @@
#include "VampEffect.h"
-//#include <vamp-sdk/Plugin.h>
-//#include <vamp-sdk/hostext/PluginChannelAdapter.h>
-//#include <vamp-sdk/hostext/PluginInputDomainAdapter.h>
+#ifdef _WIN32
#include "../../../lib-src/libvamp/vamp-sdk/Plugin.h"
#include "../../../lib-src/libvamp/vamp-sdk/hostext/PluginChannelAdapter.h"
#include "../../../lib-src/libvamp/vamp-sdk/hostext/PluginInputDomainAdapter.h"
+#else
+#include <vamp-sdk/Plugin.h>
+#include <vamp-sdk/hostext/PluginChannelAdapter.h>
+#include <vamp-sdk/hostext/PluginInputDomainAdapter.h>
+#endif
#include <wx/wxprec.h>
#include <wx/button.h>
@@ -100,7 +103,7 @@
WaveTrack *right = (WaveTrack *)iter.Next();
if (left->GetRate() != right->GetRate()) {
- wxMessageBox(_("Sorry, Vamp Plug-ins cannot be run on stereo
tracks where the individual channels of he track do not match."));
+ wxMessageBox(_("Sorry, Vamp Plug-ins cannot be run on stereo
tracks where the individual channels of the track do not match."));
return false;
}
}
@@ -198,6 +201,14 @@
bool initialiseRequired = true;
+ if (block == 0) {
+ if (step != 0) block = step;
+ else block = 1024;
+ }
+ if (step == 0) {
+ step = block;
+ }
+
if (prevTrackChannels > 0) {
// Plugin has already been initialised, so if the number of
// channels remains the same, we only need to do a reset.
@@ -207,6 +218,7 @@
mPlugin->reset();
initialiseRequired = false;
} else {
+ //!!! todo: retain parameters previously set
Init();
}
}
@@ -277,6 +289,8 @@
Vamp::Plugin::FeatureSet features = mPlugin->getRemainingFeatures();
AddFeatures(ltrack, features);
+ prevTrackChannels = channels;
+
left = (WaveTrack *)iter.Next();
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs