summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/ardour/ardour/plugin_types.h34
-rw-r--r--libs/ardour/ardour/types.h9
-rw-r--r--libs/ardour/vst_info_file.cc23
3 files changed, 47 insertions, 19 deletions
diff --git a/libs/ardour/ardour/plugin_types.h b/libs/ardour/ardour/plugin_types.h
new file mode 100644
index 0000000000..e0dd6600fc
--- /dev/null
+++ b/libs/ardour/ardour/plugin_types.h
@@ -0,0 +1,34 @@
+/*
+ Copyright (C) 2002 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __ardour_plugin_types_h__
+#define __ardour_plugin_types_h__
+
+namespace ARDOUR {
+
+ enum PluginType {
+ AudioUnit,
+ LADSPA,
+ LV2,
+ Windows_VST,
+ LXVST,
+ };
+
+}
+#endif
diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h
index 50a96030b1..ab76208c0b 100644
--- a/libs/ardour/ardour/types.h
+++ b/libs/ardour/ardour/types.h
@@ -38,6 +38,7 @@
#include "evoral/Range.hpp"
#include "ardour/chan_count.h"
+#include "ardour/plugin_types.h"
#include <map>
@@ -469,14 +470,6 @@ namespace ARDOUR {
PeakDatum max;
};
- enum PluginType {
- AudioUnit,
- LADSPA,
- LV2,
- Windows_VST,
- LXVST,
- };
-
enum RunContext {
ButlerContext = 0,
TransportContext,
diff --git a/libs/ardour/vst_info_file.cc b/libs/ardour/vst_info_file.cc
index cc0ac8431c..e6ab197fd0 100644
--- a/libs/ardour/vst_info_file.cc
+++ b/libs/ardour/vst_info_file.cc
@@ -49,6 +49,7 @@
#include "ardour/filesystem_paths.h"
#include "ardour/linux_vst_support.h"
+#include "ardour/plugin_types.h"
#include "ardour/vst_info_file.h"
#define MAX_STRING_LEN 256
@@ -532,7 +533,7 @@ vstfx_parse_vst_state (VSTState* vstfx)
}
static void
-vstfx_info_from_plugin (const char *dllpath, VSTState* vstfx, vector<VSTInfo *> *infos, int type)
+vstfx_info_from_plugin (const char *dllpath, VSTState* vstfx, vector<VSTInfo *> *infos, enum ARDOUR::PluginType type)
{
assert(vstfx);
VSTInfo *info;
@@ -574,10 +575,10 @@ vstfx_info_from_plugin (const char *dllpath, VSTState* vstfx, vector<VSTInfo *>
bool ok;
switch (type) { // TODO use lib ardour's type
#ifdef WINDOWS_VST_SUPPORT
- case 1: ok = vstfx_instantiate_and_get_info_fst(dllpath, infos, id); break;
+ case ARDOUR::Windows_VST: ok = vstfx_instantiate_and_get_info_fst(dllpath, infos, id); break;
#endif
#ifdef LXVST_SUPPORT
- case 2: ok = vstfx_instantiate_and_get_info_lx(dllpath, infos, id); break;
+ case ARDOUR::LXVST: ok = vstfx_instantiate_and_get_info_lx(dllpath, infos, id); break;
#endif
default: ok = false;
}
@@ -670,7 +671,7 @@ vstfx_instantiate_and_get_info_lx (
vstfx_current_loading_id = 0;
- vstfx_info_from_plugin(dllpath, vstfx, infos, 2);
+ vstfx_info_from_plugin(dllpath, vstfx, infos, ARDOUR::LXVST);
vstfx_close (vstfx);
vstfx_unload (h);
@@ -700,7 +701,7 @@ vstfx_instantiate_and_get_info_fst (
}
vstfx_current_loading_id = 0;
- vstfx_info_from_plugin(dllpath, vstfx, infos, 1);
+ vstfx_info_from_plugin(dllpath, vstfx, infos, ARDOUR::Windows_VST);
fst_close(vstfx);
//fst_unload(&h); // XXX -> fst_close()
@@ -717,7 +718,7 @@ static void parse_scanner_output (std::string msg, size_t /*len*/)
#endif
static vector<VSTInfo *> *
-vstfx_get_info (const char* dllpath, int type, enum VSTScanMode mode)
+vstfx_get_info (const char* dllpath, enum ARDOUR::PluginType type, enum VSTScanMode mode)
{
FILE* infofile;
vector<VSTInfo*> *infos = new vector<VSTInfo*>;
@@ -784,12 +785,12 @@ vstfx_get_info (const char* dllpath, int type, enum VSTScanMode mode)
/* blacklist in case instantiation fails */
vstfx_blacklist(dllpath);
- switch (type) { // TODO use lib ardour's type
+ switch (type) {
#ifdef WINDOWS_VST_SUPPORT
- case 1: ok = vstfx_instantiate_and_get_info_fst(dllpath, infos, 0); break;
+ case ARDOUR::Windows_VST: ok = vstfx_instantiate_and_get_info_fst(dllpath, infos, 0); break;
#endif
#ifdef LXVST_SUPPORT
- case 2: ok = vstfx_instantiate_and_get_info_lx(dllpath, infos, 0); break;
+ case ARDOUR::LXVST: ok = vstfx_instantiate_and_get_info_lx(dllpath, infos, 0); break;
#endif
default: ok = false;
}
@@ -854,7 +855,7 @@ get_personal_vst_info_cache_dir() {
vector<VSTInfo *> *
vstfx_get_info_lx (char* dllpath, enum VSTScanMode mode)
{
- return vstfx_get_info(dllpath, 2, mode);
+ return vstfx_get_info(dllpath, ARDOUR::LXVST, mode);
}
#endif
@@ -862,6 +863,6 @@ vstfx_get_info_lx (char* dllpath, enum VSTScanMode mode)
vector<VSTInfo *> *
vstfx_get_info_fst (char* dllpath, enum VSTScanMode mode)
{
- return vstfx_get_info(dllpath, 1, mode);
+ return vstfx_get_info(dllpath, ARDOUR::Windows_VST, mode);
}
#endif