summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-03-04 15:25:58 +0100
committerRobin Gareus <robin@gareus.org>2014-03-04 15:25:58 +0100
commit912f07b919c1ec44f0cdd5278d74a9bc29b91846 (patch)
tree1cd5f158ada5e8b9b73cf0d52ca5f9fa430c1fe9 /libs/ardour
parent3e250d5f0649256c8e4c7c53da4f67383dd52f78 (diff)
mingw build fixes (tested with i686-w64-mingw32 on linux-x86_64)
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/ardour/vst_types.h1
-rw-r--r--libs/ardour/vst_plugin.cc22
-rw-r--r--libs/ardour/vst_search_path.cc10
-rw-r--r--libs/ardour/wscript18
4 files changed, 20 insertions, 31 deletions
diff --git a/libs/ardour/ardour/vst_types.h b/libs/ardour/ardour/vst_types.h
index a393ef2b5a..1b443dc192 100644
--- a/libs/ardour/ardour/vst_types.h
+++ b/libs/ardour/ardour/vst_types.h
@@ -20,6 +20,7 @@
#ifndef __ardour_vst_types_h__
#define __ardour_vst_types_h__
+#include <pthread.h>
#include "ardour/libardour_visibility.h"
#include "ardour/vestige/aeffectx.h"
diff --git a/libs/ardour/vst_plugin.cc b/libs/ardour/vst_plugin.cc
index 3ea103a7b7..1eb553c073 100644
--- a/libs/ardour/vst_plugin.cc
+++ b/libs/ardour/vst_plugin.cc
@@ -351,29 +351,7 @@ VSTPlugin::load_plugin_preset (PresetRecord r)
#else
sscanf (r.uri.c_str(), "VST:%d:%d", &id, &index);
#endif
-
-#ifdef PLATFORM_WINDOWS
- int const vst_version = _plugin->dispatcher (_plugin, effGetVstVersion, 0, 0, NULL, 0);
- if (vst_version >= 2) {
- _plugin->dispatcher (_plugin, effBeginSetProgram, 0, 0, NULL, 0);
- }
-
- _plugin->dispatcher (_plugin, effSetProgram, 0, index, NULL, 0);
-
- if (vst_version >= 2) {
- _plugin->dispatcher (_plugin, effEndSetProgram, 0, 0, NULL, 0);
- }
-
- //unfortunately, we don't get any opcodes back from the plugin when this happens (?!)
- //so we have to manually update param values from the plugin to our listeners
- for (int n = 0; n < parameter_count(); n++ ) {
- float p = get_parameter(n); //ask the plugin what its new setting is
- Plugin::set_parameter (which, newval);
- }
-
-#else
_state->want_program = index;
-#endif
return true;
}
diff --git a/libs/ardour/vst_search_path.cc b/libs/ardour/vst_search_path.cc
index 78814306cd..6dea1b70a7 100644
--- a/libs/ardour/vst_search_path.cc
+++ b/libs/ardour/vst_search_path.cc
@@ -24,6 +24,8 @@
#ifdef PLATFORM_WINDOWS
+#include <windows.h>
+#include <shlobj.h> // CSIDL_*
#include "pbd/windows_special_dirs.h"
namespace ARDOUR {
@@ -56,7 +58,7 @@ vst_search_path ()
if (p == 0) {
char *pVSTx86 = 0;
- char *pProgFilesX86 = get_win_special_folder (CSIDL_PROGRAM_FILESX86);
+ char *pProgFilesX86 = PBD::get_win_special_folder (CSIDL_PROGRAM_FILESX86);
if (pProgFilesX86) {
// Look for a VST folder under C:\Program Files (x86)
@@ -75,7 +77,7 @@ vst_search_path ()
if (p == 0) {
// Look for a VST folder under C:\Program Files
char *pVST = 0;
- char *pProgFiles = get_win_special_folder (CSIDL_PROGRAM_FILES);
+ char *pProgFiles = PBD::get_win_special_folder (CSIDL_PROGRAM_FILES);
if (pProgFiles) {
if (pVST = g_build_filename (pProgFiles, "Steinberg", "VSTPlugins", 0)) {
@@ -92,7 +94,7 @@ vst_search_path ()
if (p == 0) {
// If all else failed, assume the plugins are under "My Documents"
- user_home = g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS);
+ user_home = (char*) g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS);
if (user_home) {
p = g_build_filename (user_home, "Plugins", "VST", 0);
} else {
@@ -103,7 +105,7 @@ vst_search_path ()
} else {
// Concatenate the registry path with the user's personal path
- user_home = g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS);
+ user_home = (char*) g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS);
if (user_home) {
p = g_build_path (";", p, g_build_filename(user_home, "Plugins", "VST", 0), 0);
diff --git a/libs/ardour/wscript b/libs/ardour/wscript
index 10ee3a7dbd..e13a96b912 100644
--- a/libs/ardour/wscript
+++ b/libs/ardour/wscript
@@ -294,7 +294,7 @@ def configure(conf):
# controls whether we actually use it in preference to soundtouch
# Note: as of 2104, soundtouch (WSOLA) has been out-of-use for years.
- conf.define('USE_RUBBERBAND', 1)
+ conf.define('USE_RUBBERBAND', 1)
conf.define('CURRENT_SESSION_FILE_VERSION', CURRENT_SESSION_FILE_VERSION)
@@ -315,6 +315,11 @@ def configure(conf):
autowaf.check_header(conf, 'cxx', 'boost/weak_ptr.hpp')
autowaf.check_header(conf, 'cxx', 'boost/scoped_ptr.hpp')
autowaf.check_header(conf, 'cxx', 'boost/ptr_container/ptr_list.hpp')
+ if conf.env['WINDOWS_VST_SUPPORT'] == True and Options.options.dist_target == 'mingw':
+ conf.check(compiler='cxx',
+ lib='gdi32',
+ mandatory=True,
+ uselib_store='GDI32')
def build(bld):
@@ -341,11 +346,13 @@ def build(bld):
obj.target = 'ardour'
obj.uselib = ['GLIBMM','GTHREAD','AUBIO','SIGCPP','XML','UUID',
'SNDFILE','SAMPLERATE','LRDF','AUDIOUNITS',
- 'OSX','BOOST','CURL','DL','TAGLIB','VAMPSDK','VAMPHOSTSDK','RUBBERBAND']
+ 'OSX','BOOST','CURL','TAGLIB','VAMPSDK','VAMPHOSTSDK','RUBBERBAND']
obj.use = ['libpbd','libmidipp','libevoral',
- 'libaudiographer',
+ 'libaudiographer',
'libtimecode',
]
+ if bld.env['build_target'] != 'mingw':
+ obj.uselib += ['DL']
if bld.is_defined('USE_EXTERNAL_LIBS'):
obj.uselib.extend(['VAMPSDK', 'LIBLTC'])
else:
@@ -367,7 +374,7 @@ def build(bld):
#obj.add_objects = 'default/libs/surfaces/control_protocol/smpte_1.o'
if bld.is_defined('HAVE_LILV') :
- obj.source += ['lv2_plugin.cc', 'lv2_evbuf.c', 'uri_map.cc']
+ obj.source += ['lv2_plugin.cc', 'lv2_evbuf.c', 'uri_map.cc']
obj.uselib += ['LILV']
if bld.is_defined('HAVE_SUIL'):
obj.uselib += ['SUIL']
@@ -377,7 +384,8 @@ def build(bld):
obj.includes += [ '../fst' ]
obj.defines += [ 'WINDOWS_VST_SUPPORT' ]
if bld.env['build_target'] == 'mingw':
- obj.source += [ '../fst/vstwin.c']
+ obj.source += [ '../fst/vstwin.c', '../fst/fst.c']
+ obj.uselib += ['GDI32']
if bld.is_defined('LXVST_SUPPORT'):
obj.source += [ 'lxvst_plugin.cc', 'linux_vst_support.cc' ]