From 6ff61d35633695bd356bf8d9bb59e2b8294de4f7 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Sat, 12 Mar 2005 04:59:16 +0000 Subject: minimal added event processing (like Midi in) svn path=/trunk/; revision=2620 --- externals/grill/vst/src/main.cpp | 7 ++++--- externals/grill/vst/src/vstmaster.cpp | 1 + externals/grill/vst/vst.vcproj | 3 --- 3 files changed, 5 insertions(+), 6 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 } diff --git a/externals/grill/vst/src/vstmaster.cpp b/externals/grill/vst/src/vstmaster.cpp index 0395fb65..863b57f9 100644 --- a/externals/grill/vst/src/vstmaster.cpp +++ b/externals/grill/vst/src/vstmaster.cpp @@ -274,6 +274,7 @@ void VSTPlugin::updatepos(long frames) // and if, how? samplepos += frames; + // \todo this factor should be cached ppqpos += frames*tempo/(samplerate*60); if(looping) { diff --git a/externals/grill/vst/vst.vcproj b/externals/grill/vst/vst.vcproj index 7121d85e..42d904ef 100644 --- a/externals/grill/vst/vst.vcproj +++ b/externals/grill/vst/vst.vcproj @@ -338,9 +338,6 @@ - - -- cgit v1.2.1