mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-04 09:39:42 +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,
|
bool VSTEffectsModule::RegisterPlugin(PluginManagerInterface & pm,
|
||||||
const wxString & path, wxString &errMsg)
|
const wxString & path, wxString &errMsg)
|
||||||
{
|
{
|
||||||
|
bool error = false;
|
||||||
errMsg.clear();
|
errMsg.clear();
|
||||||
// TODO: Fix this for external usage
|
// TODO: Fix this for external usage
|
||||||
const wxString &cmdpath = PlatformCompatibility::GetExecutablePath();
|
const wxString &cmdpath = PlatformCompatibility::GetExecutablePath();
|
||||||
@ -502,8 +503,8 @@ bool VSTEffectsModule::RegisterPlugin(PluginManagerInterface & pm,
|
|||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
wxLogMessage(_("VST plugin registration failed for %s\n"), path.c_str());
|
wxLogMessage(_("VST plugin registration failed for %s\n"), path.c_str());
|
||||||
|
error = true;
|
||||||
valid = false;
|
valid = false;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString output;
|
wxString output;
|
||||||
@ -632,7 +633,7 @@ bool VSTEffectsModule::RegisterPlugin(PluginManagerInterface & pm,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!valid)
|
if (error)
|
||||||
errMsg = _("Could not load the library");
|
errMsg = _("Could not load the library");
|
||||||
|
|
||||||
return valid;
|
return valid;
|
||||||
|
@ -227,6 +227,7 @@ bool LadspaEffectsModule::RegisterPlugin(PluginManagerInterface & pm,
|
|||||||
wxString saveOldCWD = ff.GetCwd();
|
wxString saveOldCWD = ff.GetCwd();
|
||||||
ff.SetCwd();
|
ff.SetCwd();
|
||||||
|
|
||||||
|
bool error = false;
|
||||||
int index = 0;
|
int index = 0;
|
||||||
LADSPA_Descriptor_Function mainFn = NULL;
|
LADSPA_Descriptor_Function mainFn = NULL;
|
||||||
wxDynamicLibrary lib;
|
wxDynamicLibrary lib;
|
||||||
@ -244,8 +245,7 @@ bool LadspaEffectsModule::RegisterPlugin(PluginManagerInterface & pm,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// If pm.RegisterPlugin is skipped, be sure to report error
|
// If pm.RegisterPlugin is skipped, be sure to report error
|
||||||
index = 0;
|
error = true;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -263,7 +263,7 @@ bool LadspaEffectsModule::RegisterPlugin(PluginManagerInterface & pm,
|
|||||||
wxSetWorkingDirectory(saveOldCWD);
|
wxSetWorkingDirectory(saveOldCWD);
|
||||||
hadpath ? wxSetEnv(wxT("PATH"), envpath) : wxUnsetEnv(wxT("PATH"));
|
hadpath ? wxSetEnv(wxT("PATH"), envpath) : wxUnsetEnv(wxT("PATH"));
|
||||||
|
|
||||||
if (index == 0)
|
if (error)
|
||||||
errMsg = _("Could not load the library");
|
errMsg = _("Could not load the library");
|
||||||
|
|
||||||
return index > 0;
|
return index > 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user