aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/vst/src/main.cpp
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2005-03-12 04:59:16 +0000
committerThomas Grill <xovo@users.sourceforge.net>2005-03-12 04:59:16 +0000
commit6ff61d35633695bd356bf8d9bb59e2b8294de4f7 (patch)
treec0461a324d9345bc919c817cd39c361d6fc2d904 /externals/grill/vst/src/main.cpp
parent42a820099a1c03b6f0a84e4f16cb983c69309aa5 (diff)
minimal
added event processing (like Midi in) svn path=/trunk/; revision=2620
Diffstat (limited to 'externals/grill/vst/src/main.cpp')
-rw-r--r--externals/grill/vst/src/main.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/externals/grill/vst/src/main.cpp b/externals/grill/vst/src/main.cpp
index 1292a746..bf50b197 100644
--- a/externals/grill/vst/src/main.cpp
+++ b/externals/grill/vst/src/main.cpp
@@ -26,7 +26,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#endif
-#define VST_VERSION "0.1.0pre19"
+#define VST_VERSION "0.1.0pre20"
class vst
@@ -308,6 +308,7 @@ void vst::Setup(t_classid c)
SetupEditor();
}
+static int corefs = 0;
vst::vst(int argc,const t_atom *argv):
plug(NULL),visible(false),
@@ -317,7 +318,7 @@ vst::vst(int argc,const t_atom *argv):
{
#if FLEXT_OS == FLEXT_OS_WIN
// this is necessary for Waveshell
- CoInitializeEx(NULL,COINIT_MULTITHREADED+COINIT_SPEED_OVER_MEMORY);
+ if(!corefs++) CoInitializeEx(NULL,COINIT_MULTITHREADED+COINIT_SPEED_OVER_MEMORY);
#endif
int ins = 1,outs = 1;
@@ -334,7 +335,7 @@ vst::~vst()
{
ClearPlug();
#if FLEXT_OS == FLEXT_OS_WIN
- CoUninitialize();
+ if(!--corefs) CoUninitialize();
#endif
}