--- /dev/null
+/*
+ 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
#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
}
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;
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;
}
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);
}
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()
#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*>;
/* 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;
}
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
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