mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-04 17:49:45 +02:00
Ladspa, VST: As before eb3bc7e: keep registering even if some errors
This commit is contained in:
parent
86b9c5c5fe
commit
0c97918bb9
@ -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;
|
||||
|
@ -227,6 +227,7 @@ bool LadspaEffectsModule::RegisterPlugin(PluginManagerInterface & pm,
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user