{
string dir;
if (personal) {
- dir = get_personal_vst_blacklist_dir();
+ dir = get_personal_vst_info_cache_dir();
+ // TODO prefix path relative to scan-root to avoid duplicates
} else {
dir = Glib::path_get_dirname (std::string(dllpath));
}
static string
vstfx_blacklist_path (const char* dllpath, int personal)
{
- return vstfx_cache_file(dllpath, personal, EXT_BLACKLIST);
+ string dir;
+ if (personal) {
+ dir = get_personal_vst_blacklist_dir();
+ } else {
+ dir = Glib::path_get_dirname (std::string(dllpath));
+ }
+
+ stringstream s;
+ s << PFX_DOTFILE << Glib::path_get_basename (dllpath) << EXT_BLACKLIST;
+ return Glib::build_filename (dir, s.str ());
}
static string
info->wantMidi = 1;
}
+ if ((info->numParams) == 0) {
+ info->ParamNames = NULL;
+ info->ParamLabels = NULL;
+ return true;
+ }
+
if ((info->ParamNames = (char **) malloc(sizeof(char*)*info->numParams)) == 0) {
return false;
}
vstfx_blacklist_file (const char *dllpath)
{
FILE *f;
- if ((f = fopen (vstfx_blacklist_path (dllpath, 0).c_str(), "w"))) {
+ if ((f = fopen (vstfx_blacklist_path (dllpath, 0).c_str(), "wb"))) {
+#ifndef NDEBUG
+ PBD::info << "Blacklisted VST: '" << vstfx_blacklist_path (dllpath, 0) << "'" << endmsg;
+#endif
return f;
}
- return fopen (vstfx_blacklist_path (dllpath, 1).c_str(), "w");
+#ifndef NDEBUG
+ PBD::info << "Blacklisted VST: '" << vstfx_blacklist_path (dllpath, 1) << "'" << endmsg;
+#endif
+ return fopen (vstfx_blacklist_path (dllpath, 1).c_str(), "wb");
}
/** mark plugin as blacklisted */
}
string const path = vstfx_infofile_path (dllpath, personal);
- return fopen (path.c_str(), "w");
+#ifndef NDEBUG
+ PBD::info << "Creating VST cache file " << path << endmsg;
+#endif
+ return fopen (path.c_str(), "wb");
}
/** newly created cache file for given plugin
if (vst_version >= 2) {
/* should we send it VST events (i.e. MIDI) */
- if ((plugin->flags & effFlagsIsSynth) || (plugin->dispatcher (plugin, effCanDo, 0, 0,(void*) "receiveVstEvents", 0.0f) > 0)) {
+ if ((plugin->flags & effFlagsIsSynth) || (plugin->dispatcher (plugin, effCanDo, 0, 0, const_cast<char*> ("receiveVstEvents"), 0.0f) > 0)) {
return true;
}
}
if (vst_version >= 2) {
/* should we send it VST events (i.e. MIDI) */
- if ( (plugin->dispatcher (plugin, effCanDo, 0, 0,(void*) "sendVstEvents", 0.0f) > 0)
- || (plugin->dispatcher (plugin, effCanDo, 0, 0,(void*) "sendVstMidiEvent", 0.0f) > 0)
+ if ( (plugin->dispatcher (plugin, effCanDo, 0, 0, const_cast<char*> ("sendVstEvents"), 0.0f) > 0)
+ || (plugin->dispatcher (plugin, effCanDo, 0, 0, const_cast<char*> ("sendVstMidiEvent"), 0.0f) > 0)
) {
return true;
}
}
/*If the plugin doesn't bother to implement GetVendorString we will
- have pre-stuffed the string with 'Unkown' */
+ have pre-stuffed the string with 'Unknown' */
plugin->dispatcher (plugin, effGetVendorString, 0, 0, creator, 0);
int id;
vector< pair<int, string> > ids;
AEffect *plugin = vstfx->plugin;
- string path = vstfx->handle->path;
do {
char name[65] = "Unknown";