aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/vst
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill/vst')
-rw-r--r--externals/grill/vst/pd/vst~-help.pd55
-rw-r--r--externals/grill/vst/src/editorwin.hpp18
-rw-r--r--externals/grill/vst/src/vsthost.cpp12
-rw-r--r--externals/grill/vst/src/vstmaster.cpp2
-rw-r--r--externals/grill/vst/vst.vcproj7
5 files changed, 61 insertions, 33 deletions
diff --git a/externals/grill/vst/pd/vst~-help.pd b/externals/grill/vst/pd/vst~-help.pd
index 2f87aa26..99427cc8 100644
--- a/externals/grill/vst/pd/vst~-help.pd
+++ b/externals/grill/vst/pd/vst~-help.pd
@@ -1,4 +1,4 @@
-#N canvas 30 4 858 559 12;
+#N canvas 645 477 862 563 12;
#X obj 26 94 noise~;
#X obj 240 189 print A;
#X obj 27 393 tgl 15 0 empty empty empty 0 -6 0 8 -261689 -1 -1 0 1
@@ -191,8 +191,7 @@ ctlchg \, progchg \, pbend;
#X restore 521 195 pd midi;
#X text 134 33 based on the work of Jarno Seppanen and Mark Williamson
;
-#X obj 742 456 loadbang;
-#X msg 742 483 \; pd dsp 1;
+#X obj 742 424 loadbang;
#X obj 520 449 tgl 15 0 empty empty empty 0 -6 0 8 -225271 -1 -1 0
1;
#X obj 520 498 s \$0-vst;
@@ -319,7 +318,7 @@ ctlchg \, progchg \, pbend;
#X restore 26 192 pd out;
#X obj 72 175 hsl 128 15 0.001 1 1 1 empty empty gain -2 -6 0 8 -261689
-1 -1 6400 1;
-#N canvas 105 36 494 651 seq 0;
+#N canvas 105 36 498 655 seq 0;
#X obj 17 225 s \$0-vst;
#X msg 112 78 samplepos \$1;
#X obj 111 60 nbx 5 14 0 1e+037 0 0 empty empty empty 0 -6 0 10 -225271
@@ -412,35 +411,39 @@ ctlchg \, progchg \, pbend;
#X connect 37 0 0 0;
#X restore 520 256 pd seq;
#X text 23 508 on the vst~ object box;
-#X text 24 491 you can also alt-click;
#X obj 27 413 pipe 100;
#X text 249 244 functions for plugin shells;
#X text 247 260 (like Waves);
#X msg 269 366 subplug;
-#X connect 0 0 44 0;
-#X connect 0 0 44 1;
-#X connect 2 0 54 0;
+#X obj 742 462 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X text 24 491 you can also shift-click;
+#X msg 742 483 \; pd dsp \$1;
+#X connect 0 0 43 0;
+#X connect 0 0 43 1;
+#X connect 2 0 52 0;
#X connect 3 0 7 0;
#X connect 4 0 7 0;
-#X connect 6 0 44 0;
+#X connect 6 0 43 0;
#X connect 9 0 10 0;
#X connect 18 0 10 0;
#X connect 19 0 20 0;
#X connect 20 0 18 0;
-#X connect 23 0 24 0;
-#X connect 25 0 27 0;
-#X connect 27 0 26 0;
-#X connect 28 0 26 0;
-#X connect 30 0 33 0;
-#X connect 33 0 31 0;
-#X connect 34 0 31 0;
-#X connect 41 0 42 0;
-#X connect 43 0 42 0;
-#X connect 44 0 49 0;
-#X connect 44 1 49 1;
-#X connect 44 2 1 0;
-#X connect 45 0 42 0;
-#X connect 48 0 42 0;
-#X connect 50 0 49 4;
-#X connect 54 0 3 0;
-#X connect 57 0 42 0;
+#X connect 23 0 56 0;
+#X connect 24 0 26 0;
+#X connect 26 0 25 0;
+#X connect 27 0 25 0;
+#X connect 29 0 32 0;
+#X connect 32 0 30 0;
+#X connect 33 0 30 0;
+#X connect 40 0 41 0;
+#X connect 42 0 41 0;
+#X connect 43 0 48 0;
+#X connect 43 1 48 1;
+#X connect 43 2 1 0;
+#X connect 44 0 41 0;
+#X connect 47 0 41 0;
+#X connect 49 0 48 4;
+#X connect 52 0 3 0;
+#X connect 55 0 41 0;
+#X connect 56 0 58 0;
diff --git a/externals/grill/vst/src/editorwin.hpp b/externals/grill/vst/src/editorwin.hpp
index cbdd807f..558301bc 100644
--- a/externals/grill/vst/src/editorwin.hpp
+++ b/externals/grill/vst/src/editorwin.hpp
@@ -15,7 +15,19 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include <map>
#include <windows.h>
-typedef std::map<flext::thrid_t,VSTPlugin *> WndMap;
+class ThrCmp
+{
+public:
+ inline bool operator()(const flext::thrid_t &a,const flext::thrid_t &b) const
+ {
+ if(sizeof(a) == sizeof(size_t))
+ return *(size_t *)&a < *(size_t *)&b;
+ else
+ return memcmp(&a,&b,sizeof(a)) < 0;
+ }
+};
+
+typedef std::map<flext::thrid_t,VSTPlugin *,ThrCmp> WndMap;
static WndMap wndmap;
static flext::ThrMutex mapmutex;
@@ -56,7 +68,7 @@ static LRESULT CALLBACK wndproc(HWND hwnd,UINT msg,WPARAM wp,LPARAM lp)
case WM_TIMER: // fall through
case WM_ENTERIDLE:
-// plug->EditorIdle();
+ plug->EditorIdle();
break;
#if 0
case WM_WINDOWPOSCHANGED: {
@@ -136,7 +148,7 @@ static LRESULT CALLBACK wndproc(HWND hwnd,UINT msg,WPARAM wp,LPARAM lp)
default:
#ifdef FLEXT_LOGGING
- flext::post("WND MSG %i, WP=%i, lp=%i",msg,wp,lp);
+// flext::post("WND MSG %i, WP=%i, lp=%i",msg,wp,lp);
#endif
res = DefWindowProc(hwnd,msg,wp,lp);
diff --git a/externals/grill/vst/src/vsthost.cpp b/externals/grill/vst/src/vsthost.cpp
index 9553f38d..3fd1a935 100644
--- a/externals/grill/vst/src/vsthost.cpp
+++ b/externals/grill/vst/src/vsthost.cpp
@@ -122,6 +122,7 @@ void VSTPlugin::worker(thr_params *)
// see if editing has stopped
if(p && p->plug->hwnd == NULL) {
// yes, it is now safe to delete the plug
+ post("DELETE %s",p->plug->dllname.c_str());
delete p->plug;
delete p;
}
@@ -170,6 +171,17 @@ bool VSTPlugin::NewPlugin(const char *plugname)
#if FLEXT_OS == FLEXT_OS_WIN
hdll = LoadLibraryEx(dllname.c_str(),NULL,0 /*DONT_RESOLVE_DLL_REFERENCES*/);
+/*
+ char buf[255],*c;
+ strcpy(buf,dllname.c_str());
+ for(c = buf; *c; ++c)
+ if(*c == '/')
+ *c = '\\';
+ char *sl = strrchr(buf,'\\');
+ if(sl) *sl = 0;
+ SetCurrentDirectory(buf);
+ hdll = LoadLibrary(dllname.c_str());
+*/
if(hdll) pluginmain = (PVSTMAIN)GetProcAddress(hdll,"main");
audiomaster = Master;
diff --git a/externals/grill/vst/src/vstmaster.cpp b/externals/grill/vst/src/vstmaster.cpp
index 03457f82..6730a647 100644
--- a/externals/grill/vst/src/vstmaster.cpp
+++ b/externals/grill/vst/src/vstmaster.cpp
@@ -181,7 +181,7 @@ long VSTPlugin::Master(AEffect *effect, long opcode, long index, long value, voi
case audioMasterGetCurrentProcessLevel: // 23
// return thread state
- return flext::GetThreadId() == flext::GetSysThreadId()?2:1;
+ return flext::IsSystemThread()?2:1;
case audioMasterGetAutomationState: // 24
// return th?(th->feedback?2:1):0;
diff --git a/externals/grill/vst/vst.vcproj b/externals/grill/vst/vst.vcproj
index 53803407..17426f48 100644
--- a/externals/grill/vst/vst.vcproj
+++ b/externals/grill/vst/vst.vcproj
@@ -86,10 +86,11 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="&quot;c:\data\pd\pd-cvs\src&quot;;..\flext\source;c:\data\prog\audio\vstsdk2.3\source\common"
+ AdditionalIncludeDirectories="c:\data\prog\packs\pthreads\include;&quot;c:\data\pd\pd-cvs\src&quot;;..\flext\source;c:\data\prog\audio\vstsdk2.3\source\common"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0501;WINVER=0x0501;_USRDLL;FLEXT_SYS=2;FLEXT_THREADS;FLEXT_LOGGING"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
+ RuntimeTypeInfo="TRUE"
UsePrecompiledHeader="2"
BrowseInformation="1"
WarningLevel="3"
@@ -100,11 +101,11 @@
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="pd.lib pthreadVC.lib"
+ AdditionalDependencies="pd.lib pthreadVC2.lib"
OutputFile="$(outdir)/vst~.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
- AdditionalLibraryDirectories="&quot;c:\data\prog\pd\pd-cvs\bin&quot;"
+ AdditionalLibraryDirectories="c:\data\prog\packs\pthreads\lib;&quot;c:\data\pd\pd-cvs\bin&quot;"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile=".\pd-msvc/d/vst~.pdb"
OptimizeReferences="2"