1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-04 01:29:43 +02:00

Ladspa, VST: As before eb3bc7e: keep registering even if some errors

This commit is contained in:
Paul Licameli 2017-12-31 15:17:48 -05:00
parent 86b9c5c5fe
commit 0c97918bb9
2 changed files with 7 additions and 6 deletions

View File

@ -469,6 +469,7 @@ wxArrayString VSTEffectsModule::FindPlugins(PluginManagerInterface & pm)
bool VSTEffectsModule::RegisterPlugin(PluginManagerInterface & pm,
const wxString & path, wxString &errMsg)
{
bool error = false;
errMsg.clear();
// TODO: Fix this for external usage
const wxString &cmdpath = PlatformCompatibility::GetExecutablePath();
@ -502,8 +503,8 @@ bool VSTEffectsModule::RegisterPlugin(PluginManagerInterface & pm,
catch (...)
{
wxLogMessage(_("VST plugin registration failed for %s\n"), path.c_str());
error = true;
valid = false;
break;
}
wxString output;
@ -632,7 +633,7 @@ bool VSTEffectsModule::RegisterPlugin(PluginManagerInterface & pm,
}
}
if (!valid)
if (error)
errMsg = _("Could not load the library");
return valid;

View File

@ -226,7 +226,8 @@ bool LadspaEffectsModule::RegisterPlugin(PluginManagerInterface & pm,
wxSetEnv(wxT("PATH"), ff.GetPath() + wxFILE_SEP_PATH + envpath);
wxString saveOldCWD = ff.GetCwd();
ff.SetCwd();
bool error = false;
int index = 0;
LADSPA_Descriptor_Function mainFn = NULL;
wxDynamicLibrary lib;
@ -244,8 +245,7 @@ bool LadspaEffectsModule::RegisterPlugin(PluginManagerInterface & pm,
}
else {
// If pm.RegisterPlugin is skipped, be sure to report error
index = 0;
break;
error = true;
}
}
}
@ -263,7 +263,7 @@ bool LadspaEffectsModule::RegisterPlugin(PluginManagerInterface & pm,
wxSetWorkingDirectory(saveOldCWD);
hadpath ? wxSetEnv(wxT("PATH"), envpath) : wxUnsetEnv(wxT("PATH"));
if (index == 0)
if (error)
errMsg = _("Could not load the library");
return index > 0;