diff --git a/Make.rules.in b/Make.rules.in deleted file mode 100644 index f72f9cc..0000000 --- a/Make.rules.in +++ /dev/null @@ -1,170 +0,0 @@ -# Copyright 2000 Francois Gouget for CodeWeavers -# fgouget@codeweavers.com -# -# Global rules shared by all makefiles -*-Makefile-*- -# -# Each individual makefile must define the following variables: -# TOPOBJDIR : top-level object directory -# SRCDIR : source directory for this module -# -# Each individual makefile may define the following additional variables: -# -# SUBDIRS : subdirectories that contain a Makefile -# DLLS : WineLib libraries to be built -# EXES : WineLib executables to be built -# -# CEXTRA : extra c flags (e.g. '-Wall') -# CXXEXTRA : extra c++ flags (e.g. '-Wall') -# WRCEXTRA : extra wrc flags (e.g. '-p _SysRes') -# DEFINES : defines (e.g. -DSTRICT) -# INCLUDE_PATH : additional include path -# LIBRARY_PATH : additional library path -# LIBRARIES : additional Unix libraries to link with -# -# C_SRCS : C sources for the module -# CXX_SRCS : C++ sources for the module -# RC_SRCS : resource source files -# SPEC_SRCS : interface definition files - - -# Where is Wine - -WINE_INCLUDE_ROOT = @WINE_INCLUDE_ROOT@ -WINE_INCLUDE_PATH = @WINE_INCLUDE_PATH@ -WINE_LIBRARY_ROOT = @WINE_LIBRARY_ROOT@ -WINE_LIBRARY_PATH = @WINE_LIBRARY_PATH@ -WINE_DLL_ROOT = @WINE_DLL_ROOT@ -WINE_DLL_PATH = @WINE_DLL_PATH@ - -LDPATH = @LDPATH@ - -# Where are the MFC - -ATL_INCLUDE_ROOT = @ATL_INCLUDE_ROOT@ -ATL_INCLUDE_PATH = @ATL_INCLUDE_PATH@ -MFC_INCLUDE_ROOT = @MFC_INCLUDE_ROOT@ -MFC_INCLUDE_PATH = @MFC_INCLUDE_PATH@ -MFC_LIBRARY_ROOT = @MFC_LIBRARY_ROOT@ -MFC_LIBRARY_PATH = @MFC_LIBRARY_PATH@ - -# Global definitions and options - -GLOBAL_DEFINES = -GLOBAL_INCLUDE_PATH = -GLOBAL_DLL_PATH = -GLOBAL_DLLS = -GLOBAL_LIBRARY_PATH = -GLOBAL_LIBRARIES = - -# First some useful definitions - -SHELL = /bin/sh -CC = @CC@ -CPP = @CPP@ -CXX = @CXX@ -WRC = @WRC@ -CFLAGS = @CFLAGS@ $(CEXTRA) -CXXFLAGS = @CXXFLAGS@ $(CXXEXTRA) -WRCFLAGS = $(WRCEXTRA) -OPTIONS = @OPTIONS@ -D_REENTRANT -LIBS = @LIBS@ $(LIBRARY_PATH) -DIVINCL = $(GLOBAL_INCLUDE_PATH) -I$(SRCDIR) $(INCLUDE_PATH) $(WINE_INCLUDE_PATH) -ALLCFLAGS = $(DIVINCL) $(CFLAGS) $(GLOBAL_DEFINES) $(DEFINES) $(OPTIONS) -ALLCXXFLAGS=$(DIVINCL) $(CXXFLAGS) $(GLOBAL_DEFINES) $(DEFINES) $(OPTIONS) -ALL_DLL_PATH = $(DLL_PATH) $(GLOBAL_DLL_PATH) $(WINE_DLL_PATH) -ALL_LIBRARY_PATH = $(LIBRARY_PATH) $(GLOBAL_LIBRARY_PATH) $(WINE_LIBRARY_PATH) -WINE_LIBRARIES = -lwine -lwine_unicode -ALL_LIBRARIES = $(LIBRARIES:%=-l%) $(GLOBAL_LIBRARIES:%=-l%) $(WINE_LIBRARIES) -LDSHARED = @LDSHARED@ -LDXXSHARED= @LDXXSHARED@ -LDDLLFLAGS= @LDDLLFLAGS@ -STRIP = strip -STRIPFLAGS= --strip-unneeded -LN_S = @LN_S@ -RM = rm -f -MV = mv -MKDIR = mkdir -p -WINE = @WINE@ -WINEBUILD = @WINEBUILD@ -@SET_MAKE@ - -# Installation infos - -INSTALL = install -INSTALL_PROGRAM = $(INSTALL) -INSTALL_SCRIPT = $(INSTALL) -INSTALL_DATA = $(INSTALL) -m 644 -prefix = @prefix@ -exec_prefix = @exec_prefix@ -bindir = @bindir@ -libdir = @libdir@ -infodir = @infodir@ -mandir = @mandir@ -dlldir = @libdir@/wine - -prog_manext = 1 -conf_manext = 5 - -OBJS = $(C_SRCS:.c=.o) $(CXX_SRCS:.cpp=.o) \ - $(SPEC_SRCS:.spec=.spec.o) -CLEAN_FILES = *.dbg.c *.spec.c y.tab.c y.tab.h lex.yy.c \ - core *.orig *.rej \ - \\\#*\\\# *~ *% .\\\#* - -# Implicit rules - -.SUFFIXES: .cpp .rc .res .spec .spec.c .spec.o - -.c.o: - $(CC) -c $(ALLCFLAGS) -o $@ $< - -.cpp.o: - $(CXX) -c $(ALLCXXFLAGS) -o $@ $< - -.cxx.o: - $(CXX) -c $(ALLCXXFLAGS) -o $@ $< - -.rc.res: - $(LDPATH) $(WRC) $(WRCFLAGS) $(DIVINCL) -o $@ $< - -.PHONY: all install uninstall clean distclean depend dummy - -# 'all' target first in case the enclosing Makefile didn't define any target - -all: Makefile - -# Rules for makefile - -Makefile: Makefile.in $(TOPSRCDIR)/configure - @echo $@ is older than $?, please rerun $(TOPSRCDIR)/configure - @exit 1 - -# Rules for cleaning - -$(SUBDIRS:%=%/__clean__): dummy - cd `dirname $@` && $(MAKE) clean - -$(EXTRASUBDIRS:%=%/__clean__): dummy - -cd `dirname $@` && $(RM) $(CLEAN_FILES) - -clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__) - $(RM) $(CLEAN_FILES) $(RC_SRCS:.rc=.res) $(OBJS) - $(RM) $(DLLS:%=%.dbg.o) $(DLLS:%=%.spec.o) $(DLLS:%=%.so) - $(RM) $(EXES:%=%.dbg.o) $(EXES:%=%.spec.o) $(EXES:%=%.so) $(EXES:%.exe=%) - -# Rules for installing - -$(SUBDIRS:%=%/__install__): dummy - cd `dirname $@` && $(MAKE) install - -$(SUBDIRS:%=%/__uninstall__): dummy - cd `dirname $@` && $(MAKE) uninstall - -# Misc. rules - -$(SUBDIRS): dummy - @cd $@ && $(MAKE) - -dummy: - -# End of global rules diff --git a/Makefile.in b/Makefile.in deleted file mode 100644 index b2ca416..0000000 --- a/Makefile.in +++ /dev/null @@ -1,170 +0,0 @@ - -### Most commonly changed configuration variables - -TARGET_DSSI_DIR = /usr/local/lib/dssi -INCLUDE_PATH = -I$(HOME)/vst/vstsdk2.3/source/common - - -### Generic autoconf variables - -TOPSRCDIR = @top_srcdir@ -TOPOBJDIR = . -SRCDIR = @srcdir@ -VPATH = @srcdir@ - -SUBDIRS = -DLLS = -EXES = dssi-vst-server.exe dssi-vst-scanner.exe - - -### Common settings - -DEFINES = -DLL_PATH = -LIBRARY_PATH = -L. -LIBRARIES = remoteplugin asound - - -### dssi-vst-server.exe sources and settings - -dssi-vst-server_exe_MODULE = dssi-vst-server.exe -dssi-vst-server_exe_APPMODE = gui -dssi-vst-server_exe_C_SRCS = -dssi-vst-server_exe_CXX_SRCS = dssi-vst-server.cpp -dssi-vst-server_exe_RC_SRCS = -dssi-vst-server_exe_SPEC_SRCS = -dssi-vst-server_exe_DLL_PATH = -L$(WINE_DLL_ROOT) -dssi-vst-server_exe_DLLS = advapi32 \ - comdlg32 \ - gdi32 \ - kernel32 \ - odbc32 \ - ole32 \ - oleaut32 \ - shell32 \ - user32 \ - winspool -dssi-vst-server_exe_LIBRARY_PATH= -dssi-vst-server_exe_LIBRARIES = -dssi-vst-server_exe_DEPENDS = - -dssi-vst-server_exe_OBJS = $(dssi-vst-server_exe_C_SRCS:.c=.o) \ - $(dssi-vst-server_exe_CXX_SRCS:.cpp=.o) \ - $(EXTRA_OBJS) - - - -### dssi-vst-scanner.exe sources and settings - -dssi-vst-scanner_exe_MODULE = dssi-vst-scanner.exe -dssi-vst-scanner_exe_APPMODE = gui -dssi-vst-scanner_exe_C_SRCS = -dssi-vst-scanner_exe_CXX_SRCS = dssi-vst-scanner.cpp -dssi-vst-scanner_exe_RC_SRCS = -dssi-vst-scanner_exe_SPEC_SRCS = -dssi-vst-scanner_exe_DLL_PATH = -L$(WINE_DLL_ROOT) -dssi-vst-scanner_exe_DLLS = advapi32 \ - comdlg32 \ - gdi32 \ - kernel32 \ - odbc32 \ - ole32 \ - oleaut32 \ - shell32 \ - user32 \ - winspool -dssi-vst-scanner_exe_LIBRARY_PATH= -dssi-vst-scanner_exe_LIBRARIES = -dssi-vst-scanner_exe_DEPENDS = - -dssi-vst-scanner_exe_OBJS = $(dssi-vst-scanner_exe_C_SRCS:.c=.o) \ - $(dssi-vst-scanner_exe_CXX_SRCS:.cpp=.o) \ - $(EXTRA_OBJS) - - - -### Global source lists - -C_SRCS = $(dssi-vst-server_exe_C_SRCS) $(dssi-vst-scanner_exe_C_SRCS) -CXX_SRCS = $(dssi-vst-server_exe_CXX_SRCS) $(dssi-vst-scanner_exe_CXX_SRCS) -RC_SRCS = $(dssi-vst-server_exe_RC_SRCS) $(dssi-vst-scanner_exe_RC_SRCS) -SPEC_SRCS = $(dssi-vst-server_exe_SPEC_SRCS) $(dssi-vst-scanner_exe_SPEC_SRCS) - - - -### Generic autoconf targets - -all: apploader $(SUBDIRS) $(DLLS:%=%.so) $(EXES:%=%.so) vsthost dssi-vst_gui libremoteplugin.a dssi-vst.so - -apploader: apploader.in - sed -e 's,@bindir\@,$(bindir),g' -e 's,@winelibdir\@,.,g' $(SRCDIR)/apploader.in >$@ || $(RM) $@ - -@MAKE_RULES@ - -install:: dssi-vst.so dssi-vst-scanner.exe.so dssi-vst-server.exe.so dssi-vst_gui apploader - $(MKDIR) $(TARGET_DSSI_DIR) - $(INSTALL) dssi-vst.so $(TARGET_DSSI_DIR) - $(MKDIR) $(TARGET_DSSI_DIR)/dssi-vst - $(INSTALL) dssi-vst-scanner.exe.so dssi-vst-server.exe.so dssi-vst_gui apploader $(TARGET_DSSI_DIR)/dssi-vst/ - ( cd $(TARGET_DSSI_DIR)/dssi-vst/ ; rm -f dssi-vst-scanner dssi-vst-server ; ln -s apploader dssi-vst-scanner ; ln -s apploader dssi-vst-server ; chmod a+x * ../dssi-vst.so ) - -uninstall:: - $(RM) $(TARGET_DSSI_DIR)/dssi-vst.so - $(RM) -r $(TARGET_DSSI_DIR)/dssi-vst - -clean:: - $(RM) apploader - -distclean: clean - $(RM) config.* configure.lineno Make.rules - $(RM) -r autom4te.cache - find . -name Makefile -exec $(RM) {} \; - -### Target specific build rules - -$(dssi-vst-server_exe_MODULE).dbg.c: $(dssi-vst-server_exe_C_SRCS) $(dssi-vst-server_exe_CXX_SRCS) - $(LDPATH) $(WINEBUILD) -o $@ --debug -C$(SRCDIR) $(dssi-vst-server_exe_C_SRCS) $(dssi-vst-server_exe_CXX_SRCS) - -$(dssi-vst-server_exe_MODULE).spec.c: $(dssi-vst-server_exe_SPEC_SRCS) $(dssi-vst-server_exe_RC_SRCS:.rc=.res) $(dssi-vst-server_exe_OBJS) - $(LDPATH) $(WINEBUILD) -fPIC -o $@ --exe $(dssi-vst-server_exe_MODULE) -m$(dssi-vst-server_exe_APPMODE) $(dssi-vst-server_exe_SPEC_SRCS:%=--spec %) $(dssi-vst-server_exe_RC_SRCS:%.rc=%.res) $(dssi-vst-server_exe_OBJS) $(dssi-vst-server_exe_DLL_PATH) $(WINE_DLL_PATH) $(GLOBAL_DLL_PATH) $(dssi-vst-server_exe_DLLS:%=-l%) $(GLOBAL_DLLS:%=-l%) - -$(dssi-vst-server_exe_MODULE).so: $(dssi-vst-server_exe_MODULE).dbg.o $(dssi-vst-server_exe_MODULE).spec.o $(dssi-vst-server_exe_OBJS) $(dssi-vst-server_exe_DEPENDS) - $(LDXXSHARED) $(LDDLLFLAGS) -o $@ $(dssi-vst-server_exe_OBJS) $(dssi-vst-server_exe_MODULE).dbg.o $(dssi-vst-server_exe_MODULE).spec.o $(dssi-vst-server_exe_LIBRARY_PATH) $(ALL_LIBRARY_PATH) $(dssi-vst-server_exe_LIBRARIES:%=-l%) $(ALL_LIBRARIES) $(LIBS) - -### Target specific build rules - -$(dssi-vst-scanner_exe_MODULE).dbg.c: $(dssi-vst-scanner_exe_C_SRCS) $(dssi-vst-scanner_exe_CXX_SRCS) - $(LDPATH) $(WINEBUILD) -o $@ --debug -C$(SRCDIR) $(dssi-vst-scanner_exe_C_SRCS) $(dssi-vst-scanner_exe_CXX_SRCS) - -$(dssi-vst-scanner_exe_MODULE).spec.c: $(dssi-vst-scanner_exe_SPEC_SRCS) $(dssi-vst-scanner_exe_RC_SRCS:.rc=.res) $(dssi-vst-scanner_exe_OBJS) - $(LDPATH) $(WINEBUILD) -fPIC -o $@ --exe $(dssi-vst-scanner_exe_MODULE) -m$(dssi-vst-scanner_exe_APPMODE) $(dssi-vst-scanner_exe_SPEC_SRCS:%=--spec %) $(dssi-vst-scanner_exe_RC_SRCS:%.rc=%.res) $(dssi-vst-scanner_exe_OBJS) $(dssi-vst-scanner_exe_DLL_PATH) $(WINE_DLL_PATH) $(GLOBAL_DLL_PATH) $(dssi-vst-scanner_exe_DLLS:%=-l%) $(GLOBAL_DLLS:%=-l%) - -$(dssi-vst-scanner_exe_MODULE).so: $(dssi-vst-scanner_exe_MODULE).dbg.o $(dssi-vst-scanner_exe_MODULE).spec.o $(dssi-vst-scanner_exe_OBJS) $(dssi-vst-scanner_exe_DEPENDS) - $(LDXXSHARED) $(LDDLLFLAGS) -o $@ $(dssi-vst-scanner_exe_OBJS) $(dssi-vst-scanner_exe_MODULE).dbg.o $(dssi-vst-scanner_exe_MODULE).spec.o $(dssi-vst-scanner_exe_LIBRARY_PATH) $(ALL_LIBRARY_PATH) $(dssi-vst-scanner_exe_LIBRARIES:%=-l%) $(ALL_LIBRARIES) $(LIBS) - - -### Client application -vsthost: vsthost.cpp remoteplugin.h remotepluginclient.h remotevstclient.o libremoteplugin.a - g++ -g3 -I/usr/local/include -L/usr/local/lib -Wall vsthost.cpp remotevstclient.o -o vsthost -L. -lremoteplugin -ljack -lasound - -libremoteplugin.a: remotepluginclient.o remotepluginserver.o rdwrops.o paths.o - ar r $@ $^ - -remotepluginclient.o: remotepluginclient.cpp remotepluginclient.h remoteplugin.h - g++ -g3 -Wall remotepluginclient.cpp -c - -remotevstclient.o: remotevstclient.cpp remotevstclient.h remotepluginclient.h remoteplugin.h - g++ -g3 -Wall remotevstclient.cpp -c - -remotepluginserver.o: remotepluginserver.cpp remotepluginserver.h remoteplugin.h - g++ -g3 -Wall remotepluginserver.cpp -c - -dssi-vst-server.o: remoteplugin.h remotepluginserver.h libremoteplugin.a -dssi-vst-scanner.o: remoteplugin.h remotepluginserver.h libremoteplugin.a - -dssi-vst.so: remoteplugin.h remotepluginclient.h libremoteplugin.a dssi-vst.cpp remotevstclient.o - g++ -shared -Wl,-Bsymbolic -g3 -Wall -o dssi-vst.so dssi-vst.cpp remotevstclient.o -L. -lremoteplugin -lasound - -dssi-vst_gui: dssi-vst_gui.cpp - g++ -g3 -Wall dssi-vst_gui.cpp rdwrops.o -o dssi-vst_gui -llo - diff --git a/README b/README index 8acc40b..83e9182 100644 --- a/README +++ b/README @@ -3,12 +3,14 @@ dssi-vst: a DSSI plugin wrapper for VST plugins =============================================== This is a DSSI plugin wrapper for VST effects and instruments with GUI -support. Copyright (c) 2004 Chris Cannam. +support. Copyright (c) 2004-2006 Chris Cannam, Fervent Software Ltd. -This is the 0.3.1 release of dssi-vst. The main improvement since the -initial 0.1 release is that dssi-vst now works correctly with VSTs -that have complex GUIs using back-channels to communicate things like -patch information to the audio plugin. +This is the 0.4 release of dssi-vst. + +The main change since the 0.3.1 release is that dssi-vst now builds +with newer versions of the Wine tools (Wine 0.9.5 or newer is +required). This release also builds with version 2.4 of the VST SDK, +although it should still work with the older 2.3 as well. Build etc @@ -16,20 +18,20 @@ Build etc To build dssi-vst, you will need: -* The dssi.h header. +* The DSSI header. -* A reasonably recent version of Wine (anything from the start of 2004 - onwards is probably OK) -- http://www.winehq.com/ +* Wine 0.9.5 or newer -- http://www.winehq.com/ -* Steve Harris's liblo "Lite OSC" library -- http://liblo.sf.net/. - You will need version 0.9 or newer. +* Steve Harris's liblo "Lite OSC" library -- http://liblo.sf.net/ -- + version 0.9 or newer. -* The VST SDK headers -- http://www.steinberg.net/steinberg/ygrabit/index.html - These are free but not redistributable. +* The VST SDK headers -- http://www.steinberg.de/Steinberg/Developers8b99.html + These are free to download, but you need to agree to Steinberg's + licensing terms and you may not redistribute them. Unzip the SDK + into the current directory (creating a subdirectory called vstsdk2.4). -Once you have all of the above, edit Makefile.in to specify the VST -SDK location; then you should be able to build and install by running -autoconf ; ./configure ; make ; make install. +Once you have all of the above, you should be able to build and +install by running "make" then "make install". To use dssi-vst: make sure DSSI_PATH is set appropriately, set VST_PATH to a colon-separated list of the directories containing VST @@ -67,7 +69,7 @@ delivering to separate VST MIDI channels using run_multiple_synths to share the VST plugin. Does not communicate tempo and beat information to the VST plugin (the -VST API has a mechanism for this, but DSSI does not). +VST API has a mechanism for this, but DSSI does not... yet). Has a tendency to leave FIFOs and shared-memory files lying around in the temporary directory (/tmp or /var/tmp). You may want to go and diff --git a/apploader.in b/apploader.in deleted file mode 100644 index c110883..0000000 --- a/apploader.in +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh - -# determine the app Winelib library name -appname=`basename "$0" .exe`.exe.so - -# and app directory -appdir="" -case "$0" in - */*) - # $0 contains a path, use it - appdir=`dirname "$0"` - ;; - *) - # no directory in $0, search in PATH - saved_ifs=$IFS - IFS=: - for d in $PATH - do - IFS=$saved_ifs - if [ -x "$d/$0" ]; then appdir="$d"; break; fi - done - ;; -esac - -export WINEDLLPATH="$appdir":$WINEDLLPATH - -mkdir -p /tmp/$$ -trap "rm -rf /tmp/$$" 0 1 2 3 15 - -( - cd /tmp/$$ - ln -s "$appdir/$appname" "." - wine "./$appname" "$@" -) - -rm -rf /tmp/$$ -exit - diff --git a/configure.ac b/configure.ac deleted file mode 100644 index 23c7dba..0000000 --- a/configure.ac +++ /dev/null @@ -1,614 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -dnl Author: Michael Patra -dnl -dnl Francois Gouget for CodeWeavers - -AC_REVISION([configure.ac 1.00]) -AC_INIT(remotepluginclient.cpp) - -NEEDS_MFC=0 - -dnl **** Command-line arguments **** - -AC_SUBST(OPTIONS) - -dnl **** Check for some programs **** - -AC_PROG_MAKE_SET -AC_PROG_CC -AC_PROG_CXX -AC_PROG_CPP -AC_PROG_LN_S - -dnl **** Check for some libraries **** - -dnl Check for -lm for BeOS -AC_CHECK_LIB(m,sqrt) -dnl Check for -lw for Solaris -AC_CHECK_LIB(w,iswalnum) -dnl Check for -lnsl for Solaris -AC_CHECK_FUNCS(gethostbyname,, AC_CHECK_LIB(nsl, gethostbyname, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl", AC_CHECK_LIB(socket, gethostbyname, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl", , -lnsl), -lsocket)) -dnl Check for -lsocket for Solaris -AC_CHECK_FUNCS(connect,,AC_CHECK_LIB(socket,connect)) - -dnl **** Check for gcc strength-reduce bug **** - -if test "x${GCC}" = "xyes" -then - AC_CACHE_CHECK([for gcc strength-reduce bug], ac_cv_c_gcc_strength_bug, - AC_TRY_RUN([ -int main(void) { - static int Array[[3]]; - unsigned int B = 3; - int i; - for(i=0; i],,ac_found=1;ac_cv_pheader_$1="$ac_dir";break) - done - CPPFLAGS="$save_CPPFLAGS" - ifelse([$3],,,[if test -z "$ac_found" - then - $3 - fi - ]) -]) -$1="$ac_cv_pheader_$1" -if test -n "$ac_found" -o -n "[$]$1" -then - AC_MSG_RESULT([$]$1) -else - AC_MSG_RESULT(no) -fi -AC_SUBST($1) -]) - -dnl AC_PATH_LIBRARY(variable,libraries,extra libs,action-if-not-found,default-locations) -AC_DEFUN(AC_PATH_LIBRARY,[ -AC_MSG_CHECKING([for $2]) -AC_CACHE_VAL(ac_cv_plibrary_$1, -[ - ac_found= - ac_dummy="ifelse([$5], , :/usr/local/lib, [$5])" - save_LIBS="$LIBS" - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - for ac_dir in $ac_dummy; do - IFS="$ac_save_ifs" - if test -z "$ac_dir" - then - LIBS="$2 $3 $save_LIBS" - else - LIBS="-L$ac_dir $2 $3 $save_LIBS" - fi - AC_TRY_LINK(,,ac_found=1;ac_cv_plibrary_$1="$ac_dir";break) - done - LIBS="$save_LIBS" - ifelse([$4],,,[if test -z "$ac_found" - then - $4 - fi - ]) -]) -$1="$ac_cv_plibrary_$1" -if test -n "$ac_found" -o -n "[$]$1" -then - AC_MSG_RESULT([$]$1) -else - AC_MSG_RESULT(no) -fi -AC_SUBST($1) -]) - -dnl **** Try to find where winelib is located **** - -LDPATH="" -WINE_INCLUDE_ROOT="" -WINE_INCLUDE_PATH="" -WINE_LIBRARY_ROOT="" -WINE_LIBRARY_PATH="" -WINE_DLL_ROOT="" -WINE_DLL_PATH="" -WINE_TOOL_PATH="" -WINE="" -WINEBUILD="" -WRC="" - -AC_ARG_WITH(wine, -[ --with-wine=DIR the Wine package (or sources) is in DIR], -[if test "$withval" != "no"; then - WINE_ROOT="$withval"; - WINE_INCLUDES=""; - WINE_LIBRARIES=""; - WINE_TOOLS=""; -else - WINE_ROOT=""; -fi]) -if test -n "$WINE_ROOT" -then - WINE_INCLUDE_ROOT="$WINE_ROOT/include:$WINE_ROOT/include/wine:$WINE_ROOT/include/wine/windows:$WINE_ROOT/include/windows" - WINE_LIBRARY_ROOT="$WINE_ROOT:$WINE_ROOT/libs:$WINE_ROOT/lib" - WINE_DLL_ROOT="$WINE_ROOT/dlls:$WINE_ROOT/lib:$WINE_ROOT/lib/wine" - WINE_TOOL_PATH="$WINE_ROOT:$WINE_ROOT/bin:$WINE_ROOT/tools/wrc:$WINE_ROOT/tools/winebuild" -fi - -AC_ARG_WITH(wine-includes, -[ --with-wine-includes=DIR the Wine includes are in DIR], -[if test "$withval" != "no"; then - WINE_INCLUDES="$withval"; -else - WINE_INCLUDES=""; -fi]) -if test -n "$WINE_INCLUDES" -then - WINE_INCLUDE_ROOT="$WINE_INCLUDES" -fi - -AC_ARG_WITH(wine-libraries, -[ --with-wine-libraries=DIR the Wine libraries are in DIR], -[if test "$withval" != "no"; then - WINE_LIBRARIES="$withval"; -else - WINE_LIBRARIES=""; -fi]) -if test -n "$WINE_LIBRARIES" -then - WINE_LIBRARY_ROOT="$WINE_LIBRARIES" -fi - -AC_ARG_WITH(wine-dlls, -[ --with-wine-dlls=DIR the Wine dlls are in DIR], -[if test "$withval" != "no"; then - WINE_DLLS="$withval"; -else - WINE_DLLS=""; -fi]) -if test -n "$WINE_DLLS" -then - WINE_DLL_ROOT="$WINE_DLLS" -fi - -AC_ARG_WITH(wine-tools, -[ --with-wine-tools=DIR the Wine tools are in DIR], -[if test "$withval" != "no"; then - WINE_TOOLS="$withval"; -else - WINE_TOOLS=""; -fi]) -if test -n "$WINE_TOOLS" -then - WINE_TOOL_PATH="$WINE_TOOLS:$WINE_TOOLS/tools/wrc:$WINE_TOOLS/tools/winebuild" -fi - -if test -z "$WINE_INCLUDE_ROOT" -then - WINE_INCLUDE_ROOT=":/usr/include/wine/windows:/usr/include/wine:/usr/local/include/wine/windows:/opt/wine/include/windows:/opt/wine/include/wine"; -else - AC_PATH_FILE(WINE_INCLUDE_ROOT,[windef.h],[ - AC_MSG_ERROR([Could not find the Wine headers (windef.h)]) - ],$WINE_INCLUDE_ROOT) -fi -AC_PATH_HEADER(WINE_INCLUDE_ROOT,[windef.h],[ - AC_MSG_ERROR([Could not include the Wine headers (windef.h)]) -],$WINE_INCLUDE_ROOT) -if test -n "$WINE_INCLUDE_ROOT" -then - WINE_INCLUDE_PATH="-I$WINE_INCLUDE_ROOT" -else - WINE_INCLUDE_PATH="" -fi - -if test -z "$WINE_LIBRARY_ROOT" -then - WINE_LIBRARY_ROOT=":/usr/lib/wine:/usr/local/lib:/usr/local/lib/wine:/opt/wine/lib" -else - AC_PATH_FILE(WINE_LIBRARY_ROOT,[libwine.so],[ - AC_MSG_ERROR([Could not find the Wine libraries (libwine.so)]) - ],$WINE_LIBRARY_ROOT) -fi -AC_PATH_LIBRARY(WINE_LIBRARY_ROOT,[-lwine],[],[ - AC_MSG_ERROR([Could not link with the Wine libraries (libwine.so)]) -],$WINE_LIBRARY_ROOT) -if test -n "$WINE_LIBRARY_ROOT" -then - WINE_LIBRARY_PATH="-L$WINE_LIBRARY_ROOT" - LDPATH="$WINE_LIBRARY_ROOT" -else - WINE_LIBRARY_PATH="" -fi - -save_LIBS="$LIBS" -LIBS="$WINE_LIBRARY_PATH $LIBS" - -AC_CHECK_LIB(wine_unicode,wine_cp_wcstombs,[],[ - AC_MSG_ERROR([Could not find the Wine dlls (libwine_unicode.so)]) -]) -#AC_CHECK_LIB(wine_uuid,IID_IUnknown,[],[ -# AC_MSG_ERROR([Could not find the Wine dlls (libwine_uuid.so)]) -#]) - -LIBS="$save_LIBS" - -if test -z "$WINE_DLL_ROOT" -then - if test -n "$WINE_LIBRARY_ROOT" - then - WINE_DLL_ROOT="$WINE_LIBRARY_ROOT:$WINE_LIBRARY_ROOT/dlls:$WINE_LIBRARY_ROOT/wine" - else - WINE_DLL_ROOT="/lib:/lib/wine:/usr/lib:/usr/lib/wine:/usr/local/lib:/usr/local/lib/wine" - fi -fi -AC_PATH_FILE(WINE_DLL_ROOT,[libntdll.def],[ - AC_MSG_ERROR([Could not find the Wine dlls (libntdll.def)]) -],[$WINE_DLL_ROOT]) -WINE_DLL_PATH="-L$WINE_DLL_ROOT" - -if test -z "$WINE_TOOL_PATH" -then - WINE_TOOL_PATH="$PATH:/usr/local/bin:/opt/wine/bin" -fi -AC_PATH_PROG(WINE,wine,,$WINE_TOOL_PATH) -if test -z "$WINE" -then - AC_MSG_ERROR([Could not find Wine's wine tool]) -fi -AC_PATH_PROG(WINEBUILD,winebuild,,$WINE_TOOL_PATH) -if test -z "$WINEBUILD" -then - AC_MSG_ERROR([Could not find Wine's winebuild tool]) -fi -AC_PATH_PROG(WRC,wrc,,$WINE_TOOL_PATH) -if test -z "$WRC" -then - AC_MSG_ERROR([Could not find Wine's wrc tool]) -fi - -LDPATH="LD_LIBRARY_PATH=\"$LDPATH:\$\$LD_LIBRARY_PATH\"" -AC_SUBST(LDPATH) -AC_SUBST(WINE_INCLUDE_PATH) -AC_SUBST(WINE_LIBRARY_PATH) -AC_SUBST(WINE_DLL_PATH) - -dnl **** Try to find where the MFC are located **** -AC_LANG_CPLUSPLUS() - -if test "x$NEEDS_MFC" = "x1" -then - ATL_INCLUDE_ROOT=""; - ATL_INCLUDE_PATH=""; - MFC_INCLUDE_ROOT=""; - MFC_INCLUDE_PATH=""; - MFC_LIBRARY_ROOT=""; - MFC_LIBRARY_PATH=""; - - AC_ARG_WITH(mfc, - [ --with-mfc=DIR the MFC package (or sources) is in DIR], - [if test "$withval" != "no"; then - MFC_ROOT="$withval"; - ATL_INCLUDES=""; - MFC_INCLUDES=""; - MFC_LIBRARIES=""; - else - MFC_ROOT=""; - fi]) - if test -n "$MFC_ROOT" - then - ATL_INCLUDE_ROOT="$MFC_ROOT"; - MFC_INCLUDE_ROOT="$MFC_ROOT"; - MFC_LIBRARY_ROOT="$MFC_ROOT"; - fi - - AC_ARG_WITH(atl-includes, - [ --with-atl-includes=DIR the ATL includes are in DIR], - [if test "$withval" != "no"; then - ATL_INCLUDES="$withval"; - else - ATL_INCLUDES=""; - fi]) - if test -n "$ATL_INCLUDES" - then - ATL_INCLUDE_ROOT="$ATL_INCLUDES"; - fi - - AC_ARG_WITH(mfc-includes, - [ --with-mfc-includes=DIR the MFC includes are in DIR], - [if test "$withval" != "no"; then - MFC_INCLUDES="$withval"; - else - MFC_INCLUDES=""; - fi]) - if test -n "$MFC_INCLUDES" - then - MFC_INCLUDE_ROOT="$MFC_INCLUDES"; - fi - - AC_ARG_WITH(mfc-libraries, - [ --with-mfc-libraries=DIR the MFC libraries are in DIR], - [if test "$withval" != "no"; then - MFC_LIBRARIES="$withval"; - else - MFC_LIBRARIES=""; - fi]) - if test -n "$MFC_LIBRARIES" - then - MFC_LIBRARY_ROOT="$MFC_LIBRARIES"; - fi - - OLDCPPFLAGS="$CPPFLAGS" - dnl FIXME: We should not have defines in any of the include paths - CPPFLAGS="$WINE_INCLUDE_PATH -I$WINE_INCLUDE_ROOT/msvcrt -D_DLL -D_MT $CPPFLAGS" - ATL_INCLUDE_PATH="-I\$(WINE_INCLUDE_ROOT)/msvcrt -D_DLL -D_MT" - if test -z "$ATL_INCLUDE_ROOT" - then - ATL_INCLUDE_ROOT=":$WINE_INCLUDE_ROOT/atl:/usr/include/atl:/usr/local/include/atl:/opt/mfc/include/atl:/opt/atl/include" - else - ATL_INCLUDE_ROOT="$ATL_INCLUDE_ROOT:$ATL_INCLUDE_ROOT/atl:$ATL_INCLUDE_ROOT/atl/include" - fi - AC_PATH_HEADER(ATL_INCLUDE_ROOT,atldef.h,[ - AC_MSG_ERROR([Could not find the ATL includes]) - ],$ATL_INCLUDE_ROOT) - if test -n "$ATL_INCLUDE_ROOT" - then - ATL_INCLUDE_PATH="$ATL_INCLUDE_PATH -I$ATL_INCLUDE_ROOT" - fi - - MFC_INCLUDE_PATH="$ATL_INCLUDE_PATH" - if test -z "$MFC_INCLUDE_ROOT" - then - MFC_INCLUDE_ROOT=":$WINE_INCLUDE_ROOT/mfc:/usr/include/mfc:/usr/local/include/mfc:/opt/mfc/include/mfc:/opt/mfc/include" - else - MFC_INCLUDE_ROOT="$MFC_INCLUDE_ROOT:$MFC_INCLUDE_ROOT/mfc:$MFC_INCLUDE_ROOT/mfc/include" - fi - AC_PATH_HEADER(MFC_INCLUDE_ROOT,afx.h,[ - AC_MSG_ERROR([Could not find the MFC includes]) - ],$MFC_INCLUDE_ROOT) - if test -n "$MFC_INCLUDE_ROOT" -a "$ATL_INCLUDE_ROOT" != "$MFC_INCLUDE_ROOT" - then - MFC_INCLUDE_PATH="$MFC_INCLUDE_PATH -I$MFC_INCLUDE_ROOT" - fi - CPPFLAGS="$OLDCPPFLAGS" - - if test -z "$MFC_LIBRARY_ROOT" - then - MFC_LIBRARY_ROOT=":$WINE_LIBRARY_ROOT:/usr/lib/mfc:/usr/local/lib:/usr/local/lib/mfc:/opt/mfc/lib"; - else - MFC_LIBRARY_ROOT="$MFC_LIBRARY_ROOT:$MFC_LIBRARY_ROOT/lib:$MFC_LIBRARY_ROOT/mfc/src"; - fi - AC_PATH_LIBRARY(MFC_LIBRARY_ROOT,[-lmfc],[$WINE_LIBRARY_PATH -lwine -lwine_unicode],[ - AC_MSG_ERROR([Could not find the MFC library]) - ],$MFC_LIBRARY_ROOT) - if test -n "$MFC_LIBRARY_ROOT" -a "$MFC_LIBRARY_ROOT" != "$WINE_LIBRARY_ROOT" - then - MFC_LIBRARY_PATH="-L$MFC_LIBRARY_ROOT" - else - MFC_LIBRARY_PATH="" - fi - - AC_SUBST(ATL_INCLUDE_PATH) - AC_SUBST(MFC_INCLUDE_PATH) - AC_SUBST(MFC_LIBRARY_PATH) -fi - -AC_LANG_C() - -dnl **** Generate output files **** - -MAKE_RULES=Make.rules -AC_SUBST_FILE(MAKE_RULES) - -AC_OUTPUT([ -Make.rules -Makefile - ]) - -echo -echo "Configure finished. Do 'make' to build the project." -echo - -dnl Local Variables: -dnl comment-start: "dnl " -dnl comment-end: "" -dnl comment-start-skip: "\\bdnl\\b\\s *" -dnl compile-command: "autoconf" -dnl End: diff --git a/dssi-vst-scanner.cpp b/dssi-vst-scanner.cpp index c879e4d..d89580f 100644 --- a/dssi-vst-scanner.cpp +++ b/dssi-vst-scanner.cpp @@ -2,7 +2,7 @@ /* dssi-vst: a DSSI plugin wrapper for VST effects and instruments - Copyright 2004 Chris Cannam + Copyright 2004-2006 Chris Cannam */ #include @@ -26,14 +26,27 @@ #include "paths.h" #define APPLICATION_CLASS_NAME "dssi_vst" -#define PLUGIN_ENTRY_POINT "main" +#define OLD_PLUGIN_ENTRY_POINT "main" +#define NEW_PLUGIN_ENTRY_POINT "VSTPluginMain" + +#if VST_FORCE_DEPRECATED +#define DEPRECATED_VST_SYMBOL(x) __##x##Deprecated +#else +#define DEPRECATED_VST_SYMBOL(x) x +#endif using namespace std; +#if VST_2_4_EXTENSIONS +VstIntPtr VSTCALLBACK +hostCallback(AEffect *plugin, VstInt32 opcode, VstInt32 index, + VstIntPtr value, void *ptr, float opt) +#else long VSTCALLBACK hostCallback(AEffect *plugin, long opcode, long index, long value, void *ptr, float opt) +#endif { static VstTimeInfo timeInfo; @@ -72,7 +85,7 @@ hostCallback(AEffect *plugin, long opcode, long index, timeInfo.flags = 0; // don't mark anything valid except default samplePos/Rate return (long)&timeInfo; - case audioMasterTempoAt: + case DEPRECATED_VST_SYMBOL(audioMasterTempoAt): // can't support this, return 120bpm return 120 * 10000; @@ -86,7 +99,7 @@ hostCallback(AEffect *plugin, long opcode, long index, 0, 1024, NULL, 0); break; - case audioMasterWillReplaceOrAccumulate: + case DEPRECATED_VST_SYMBOL(audioMasterWillReplaceOrAccumulate): // 0 -> unsupported, 1 -> replace, 2 -> accumulate return 1; @@ -94,15 +107,13 @@ hostCallback(AEffect *plugin, long opcode, long index, // 0 -> unsupported, 1 -> gui, 2 -> process, 3 -> midi/timer, 4 -> offline return 1; - case audioMasterGetParameterQuantization: + case DEPRECATED_VST_SYMBOL(audioMasterGetParameterQuantization): return 1; - - case audioMasterNeedIdle: - // might be nice to handle this better + + case DEPRECATED_VST_SYMBOL(audioMasterNeedIdle): return 1; - case audioMasterWantMidi: - // happy to oblige + case DEPRECATED_VST_SYMBOL(audioMasterWantMidi): return 1; default: @@ -118,7 +129,7 @@ WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdline, int cmdshow) char *destFile = 0; cout << "DSSI VST plugin scanner v0.3" << endl; - cout << "Copyright (c) 2004 Chris Cannam - Fervent Software" << endl; + cout << "Copyright (c) 2004-2006 Chris Cannam - Fervent Software" << endl; if (cmdline && cmdline[0]) destFile = strdup(cmdline); @@ -272,12 +283,19 @@ WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdline, int cmdshow) } getInstance = (AEffect*(__stdcall*)(audioMasterCallback)) - GetProcAddress(libHandle, PLUGIN_ENTRY_POINT); + GetProcAddress(libHandle, NEW_PLUGIN_ENTRY_POINT); if (!getInstance) { - cerr << "dssi-vst-scanner: VST entrypoint \"" << PLUGIN_ENTRY_POINT - << "\" not found in DLL \"" << libPath << "\"" << endl; - goto done; + getInstance = (AEffect*(__stdcall*)(audioMasterCallback)) + GetProcAddress(libHandle, OLD_PLUGIN_ENTRY_POINT); + + if (!getInstance) { + cerr << "dssi-vst-scanner: VST entrypoints \"" + << NEW_PLUGIN_ENTRY_POINT << "\" or \"" + << OLD_PLUGIN_ENTRY_POINT << "\" not found in DLL \"" + << libname << "\"" << endl; + goto done; + } } plugin = getInstance(hostCallback); diff --git a/dssi-vst-server.cpp b/dssi-vst-server.cpp index 332eb1c..62c7205 100644 --- a/dssi-vst-server.cpp +++ b/dssi-vst-server.cpp @@ -2,7 +2,7 @@ /* dssi-vst: a DSSI plugin wrapper for VST effects and instruments - Copyright 2004 Chris Cannam + Copyright 2004-2006 Chris Cannam */ #include @@ -33,7 +33,14 @@ #include "rdwrops.h" #define APPLICATION_CLASS_NAME "dssi_vst" -#define PLUGIN_ENTRY_POINT "main" +#define OLD_PLUGIN_ENTRY_POINT "main" +#define NEW_PLUGIN_ENTRY_POINT "VSTPluginMain" + +#if VST_FORCE_DEPRECATED +#define DEPRECATED_VST_SYMBOL(x) __##x##Deprecated +#else +#define DEPRECATED_VST_SYMBOL(x) x +#endif struct Rect { short top; @@ -672,9 +679,15 @@ RemoteVSTServer::terminateGUIProcess() } } +#if VST_2_4_EXTENSIONS +VstIntPtr VSTCALLBACK +hostCallback(AEffect *plugin, VstInt32 opcode, VstInt32 index, + VstIntPtr value, void *ptr, float opt) +#else long VSTCALLBACK hostCallback(AEffect *plugin, long opcode, long index, long value, void *ptr, float opt) +#endif { static VstTimeInfo timeInfo; int rv = 0; @@ -728,7 +741,7 @@ hostCallback(AEffect *plugin, long opcode, long index, cerr << "dssi-vst-server[2]: audioMasterPinConnected requested" << endl; break; - case audioMasterWantMidi: + case DEPRECATED_VST_SYMBOL(audioMasterWantMidi): if (debugLevel > 1) { cerr << "dssi-vst-server[2]: audioMasterWantMidi requested" << endl; } @@ -750,25 +763,25 @@ hostCallback(AEffect *plugin, long opcode, long index, cerr << "dssi-vst-server[2]: audioMasterProcessEvents requested" << endl; break; - case audioMasterSetTime: + case DEPRECATED_VST_SYMBOL(audioMasterSetTime): if (debugLevel > 1) cerr << "dssi-vst-server[2]: audioMasterSetTime requested" << endl; break; - case audioMasterTempoAt: + case DEPRECATED_VST_SYMBOL(audioMasterTempoAt): if (debugLevel > 1) cerr << "dssi-vst-server[2]: audioMasterTempoAt requested" << endl; // can't support this, return 120bpm rv = 120 * 10000; break; - case audioMasterGetNumAutomatableParameters: + case DEPRECATED_VST_SYMBOL(audioMasterGetNumAutomatableParameters): if (debugLevel > 1) cerr << "dssi-vst-server[2]: audioMasterGetNumAutomatableParameters requested" << endl; rv = 5000; break; - case audioMasterGetParameterQuantization : + case DEPRECATED_VST_SYMBOL(audioMasterGetParameterQuantization): if (debugLevel > 1) cerr << "dssi-vst-server[2]: audioMasterGetParameterQuantization requested" << endl; rv = 1; @@ -780,7 +793,7 @@ hostCallback(AEffect *plugin, long opcode, long index, cerr << "WARNING: Plugin inputs and/or outputs changed: NOT SUPPORTED" << endl; break; - case audioMasterNeedIdle: + case DEPRECATED_VST_SYMBOL(audioMasterNeedIdle): if (debugLevel > 1) { cerr << "dssi-vst-server[2]: audioMasterNeedIdle requested" << endl; } @@ -832,17 +845,17 @@ hostCallback(AEffect *plugin, long opcode, long index, cerr << "dssi-vst-server[2]: audioMasterGetOutputLatency requested" << endl; break; - case audioMasterGetPreviousPlug: + case DEPRECATED_VST_SYMBOL(audioMasterGetPreviousPlug): if (debugLevel > 1) cerr << "dssi-vst-server[2]: audioMasterGetPreviousPlug requested" << endl; break; - case audioMasterGetNextPlug: + case DEPRECATED_VST_SYMBOL(audioMasterGetNextPlug): if (debugLevel > 1) cerr << "dssi-vst-server[2]: audioMasterGetNextPlug requested" << endl; break; - case audioMasterWillReplaceOrAccumulate: + case DEPRECATED_VST_SYMBOL(audioMasterWillReplaceOrAccumulate): if (debugLevel > 1) cerr << "dssi-vst-server[2]: audioMasterWillReplaceOrAccumulate requested" << endl; // 0 -> unsupported, 1 -> replace, 2 -> accumulate @@ -889,16 +902,18 @@ hostCallback(AEffect *plugin, long opcode, long index, cerr << "dssi-vst-server[2]: audioMasterOfflineGetCurrentMetaPass requested" << endl; break; - case audioMasterSetOutputSampleRate: + case DEPRECATED_VST_SYMBOL(audioMasterSetOutputSampleRate): if (debugLevel > 1) cerr << "dssi-vst-server[2]: audioMasterSetOutputSampleRate requested" << endl; break; +/* Deprecated in VST 2.4 and also (accidentally?) renamed in the SDK header, + so we won't retain it here case audioMasterGetSpeakerArrangement: if (debugLevel > 1) cerr << "dssi-vst-server[2]: audioMasterGetSpeakerArrangement requested" << endl; break; - +*/ case audioMasterGetVendorString: if (debugLevel > 1) cerr << "dssi-vst-server[2]: audioMasterGetVendorString requested" << endl; @@ -922,7 +937,7 @@ hostCallback(AEffect *plugin, long opcode, long index, cerr << "dssi-vst-server[2]: audioMasterVendorSpecific requested" << endl; break; - case audioMasterSetIcon: + case DEPRECATED_VST_SYMBOL(audioMasterSetIcon): if (debugLevel > 1) cerr << "dssi-vst-server[2]: audioMasterSetIcon requested" << endl; break; @@ -946,12 +961,12 @@ hostCallback(AEffect *plugin, long opcode, long index, rv = kVstLangEnglish; break; - case audioMasterOpenWindow: + case DEPRECATED_VST_SYMBOL(audioMasterOpenWindow): if (debugLevel > 1) cerr << "dssi-vst-server[2]: audioMasterOpenWindow requested" << endl; break; - case audioMasterCloseWindow: + case DEPRECATED_VST_SYMBOL(audioMasterCloseWindow): if (debugLevel > 1) cerr << "dssi-vst-server[2]: audioMasterCloseWindow requested" << endl; break; @@ -988,17 +1003,17 @@ hostCallback(AEffect *plugin, long opcode, long index, cerr << "dssi-vst-server[2]: audioMasterCloseFileSelector requested" << endl; break; - case audioMasterEditFile: + case DEPRECATED_VST_SYMBOL(audioMasterEditFile): if (debugLevel > 1) cerr << "dssi-vst-server[2]: audioMasterEditFile requested" << endl; break; - case audioMasterGetChunkFile: + case DEPRECATED_VST_SYMBOL(audioMasterGetChunkFile): if (debugLevel > 1) cerr << "dssi-vst-server[2]: audioMasterGetChunkFile requested" << endl; break; - case audioMasterGetInputSpeakerArrangement: + case DEPRECATED_VST_SYMBOL(audioMasterGetInputSpeakerArrangement): if (debugLevel > 1) cerr << "dssi-vst-server[2]: audioMasterGetInputSpeakerArrangement requested" << endl; break; @@ -1045,6 +1060,7 @@ WatchdogThreadMain(LPVOID parameter) param.sched_priority = 0; (void)sched_setscheduler(0, SCHED_OTHER, ¶m); + return 0; } DWORD WINAPI @@ -1117,7 +1133,7 @@ WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdline, int cmdshow) bool tryGui = false, haveGui = true; cout << "DSSI VST plugin server v" << RemotePluginVersion << endl; - cout << "Copyright (c) 2004 Chris Cannam - Fervent Software" << endl; + cout << "Copyright (c) 2004-2006 Chris Cannam - Fervent Software" << endl; char *home = getenv("HOME"); @@ -1218,16 +1234,35 @@ WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdline, int cmdshow) //!!! better debug level support AEffect *(__stdcall* getInstance)(audioMasterCallback); + getInstance = (AEffect*(__stdcall*)(audioMasterCallback)) - GetProcAddress(libHandle, PLUGIN_ENTRY_POINT); + GetProcAddress(libHandle, NEW_PLUGIN_ENTRY_POINT); if (!getInstance) { - cerr << "dssi-vst-server: ERROR: VST entrypoint \"" << PLUGIN_ENTRY_POINT - << "\" not found in DLL \"" << libname << "\"" << endl; - return 1; + if (debugLevel > 0) { + cerr << "dssi-vst-server[1]: VST 2.4 entrypoint \"" + << NEW_PLUGIN_ENTRY_POINT << "\" not found in DLL \"" + << libname << "\", looking for \"" + << OLD_PLUGIN_ENTRY_POINT << "\"" << endl; + } + + getInstance = (AEffect*(__stdcall*)(audioMasterCallback)) + GetProcAddress(libHandle, OLD_PLUGIN_ENTRY_POINT); + + if (!getInstance) { + cerr << "dssi-vst-server: ERROR: VST entrypoints \"" + << NEW_PLUGIN_ENTRY_POINT << "\" or \"" + << OLD_PLUGIN_ENTRY_POINT << "\" not found in DLL \"" + << libname << "\"" << endl; + return 1; + } else if (debugLevel > 0) { + cerr << "dssi-vst-server[1]: VST entrypoint \"" + << OLD_PLUGIN_ENTRY_POINT << "\" found" << endl; + } + } else if (debugLevel > 0) { - cerr << "dssi-vst-server[1]: VST entrypoint \"" << PLUGIN_ENTRY_POINT - << "\" found" << endl; + cerr << "dssi-vst-server[1]: VST entrypoint \"" + << NEW_PLUGIN_ENTRY_POINT << "\" found" << endl; } AEffect *plugin = getInstance(hostCallback); @@ -1287,7 +1322,7 @@ WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdline, int cmdshow) wclass.hInstance = hInst; wclass.hIcon = LoadIcon(hInst, APPLICATION_CLASS_NAME); wclass.hCursor = LoadCursor(0, IDI_APPLICATION); - wclass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH); +// wclass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH); wclass.lpszMenuName = "MENU_DSSI_VST"; wclass.lpszClassName = APPLICATION_CLASS_NAME; wclass.hIconSm = 0; diff --git a/dssi-vst.cpp b/dssi-vst.cpp index 4fb82c2..e3f2f22 100644 --- a/dssi-vst.cpp +++ b/dssi-vst.cpp @@ -3,7 +3,7 @@ /* dssi-vst: a DSSI plugin wrapper for VST effects and instruments - Copyright 2004 Chris Cannam + Copyright 2004-2006 Chris Cannam */ #include "remotevstclient.h" diff --git a/dssi-vst_gui.cpp b/dssi-vst_gui.cpp index 84826ac..52b2087 100644 --- a/dssi-vst_gui.cpp +++ b/dssi-vst_gui.cpp @@ -2,7 +2,7 @@ /* dssi-vst: a DSSI plugin wrapper for VST effects and instruments - Copyright 2004 Chris Cannam + Copyright 2004-2006 Chris Cannam */ #include @@ -184,7 +184,7 @@ int main(int argc, char **argv) { cout << "DSSI VST plugin GUI controller v" << RemotePluginVersion << endl; - cout << "Copyright (c) 2004 Chris Cannam" << endl; + cout << "Copyright (c) 2004-2006 Chris Cannam" << endl; char *pluginlibname = 0; char *label = 0; diff --git a/paths.cpp b/paths.cpp index acf621a..197b9c7 100644 --- a/paths.cpp +++ b/paths.cpp @@ -2,7 +2,7 @@ /* dssi-vst: a DSSI plugin wrapper for VST effects and instruments - Copyright 2004 Chris Cannam + Copyright 2004-2006 Chris Cannam */ #include "paths.h" diff --git a/paths.h b/paths.h index 9adb030..0e123d5 100644 --- a/paths.h +++ b/paths.h @@ -3,7 +3,7 @@ /* dssi-vst: a DSSI plugin wrapper for VST effects and instruments - Copyright 2004 Chris Cannam + Copyright 2004-2006 Chris Cannam */ #ifndef _PATHS_H_ diff --git a/rdwrops.cpp b/rdwrops.cpp index a7e7e06..f32c20f 100644 --- a/rdwrops.cpp +++ b/rdwrops.cpp @@ -4,7 +4,7 @@ /* dssi-vst: a DSSI plugin wrapper for VST effects and instruments - Copyright 2004 Chris Cannam + Copyright 2004-2006 Chris Cannam */ #include "rdwrops.h" diff --git a/rdwrops.h b/rdwrops.h index 88ae81e..04b8223 100644 --- a/rdwrops.h +++ b/rdwrops.h @@ -2,7 +2,7 @@ /* dssi-vst: a DSSI plugin wrapper for VST effects and instruments - Copyright 2004 Chris Cannam + Copyright 2004-2006 Chris Cannam */ #ifndef _RD_WR_OPS_H_ diff --git a/remoteplugin.h b/remoteplugin.h index 763388f..1d284a8 100644 --- a/remoteplugin.h +++ b/remoteplugin.h @@ -2,13 +2,13 @@ /* dssi-vst: a DSSI plugin wrapper for VST effects and instruments - Copyright 2004 Chris Cannam + Copyright 2004-2006 Chris Cannam */ #ifndef REMOTE_PLUGIN_H #define REMOTE_PLUGIN_H -static const float RemotePluginVersion = 0.985; +static const float RemotePluginVersion = 0.986; enum RemotePluginDebugLevel { RemotePluginDebugNone, diff --git a/remotepluginclient.cpp b/remotepluginclient.cpp index 7ab1077..35ae093 100644 --- a/remotepluginclient.cpp +++ b/remotepluginclient.cpp @@ -2,7 +2,7 @@ /* dssi-vst: a DSSI plugin wrapper for VST effects and instruments - Copyright 2004 Chris Cannam + Copyright 2004-2006 Chris Cannam */ #include "remotepluginclient.h" diff --git a/remotepluginclient.h b/remotepluginclient.h index d36e3b7..853beaf 100644 --- a/remotepluginclient.h +++ b/remotepluginclient.h @@ -2,7 +2,7 @@ /* dssi-vst: a DSSI plugin wrapper for VST effects and instruments - Copyright 2004 Chris Cannam + Copyright 2004-2006 Chris Cannam */ #ifndef REMOTE_PLUGIN_CLIENT_H diff --git a/remotepluginserver.cpp b/remotepluginserver.cpp index bcc1f9f..14a3091 100644 --- a/remotepluginserver.cpp +++ b/remotepluginserver.cpp @@ -2,7 +2,7 @@ /* dssi-vst: a DSSI plugin wrapper for VST effects and instruments - Copyright 2004 Chris Cannam + Copyright 2004-2006 Chris Cannam */ #include "remotepluginserver.h" diff --git a/remotepluginserver.h b/remotepluginserver.h index 9633997..bbaf343 100644 --- a/remotepluginserver.h +++ b/remotepluginserver.h @@ -2,7 +2,7 @@ /* dssi-vst: a DSSI plugin wrapper for VST effects and instruments - Copyright 2004 Chris Cannam + Copyright 2004-2006 Chris Cannam */ #ifndef REMOTE_PLUGIN_SERVER_H diff --git a/remotevstclient.cpp b/remotevstclient.cpp index 42253cf..0ea0a8a 100644 --- a/remotevstclient.cpp +++ b/remotevstclient.cpp @@ -2,7 +2,7 @@ /* dssi-vst: a DSSI plugin wrapper for VST effects and instruments - Copyright 2004 Chris Cannam + Copyright 2004-2006 Chris Cannam */ #include "remotevstclient.h" diff --git a/remotevstclient.h b/remotevstclient.h index 7aab7d5..00ebb14 100644 --- a/remotevstclient.h +++ b/remotevstclient.h @@ -2,7 +2,7 @@ /* dssi-vst: a DSSI plugin wrapper for VST effects and instruments - Copyright 2004 Chris Cannam + Copyright 2004-2006 Chris Cannam */ #ifndef REMOTE_VST_CLIENT_H diff --git a/vsthost.cpp b/vsthost.cpp index 7301387..db8abe4 100644 --- a/vsthost.cpp +++ b/vsthost.cpp @@ -2,7 +2,7 @@ /* dssi-vst: a DSSI plugin wrapper for VST effects and instruments - Copyright 2004 Chris Cannam + Copyright 2004-2006 Chris Cannam */ #include