mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-21 14:02:57 +02:00
Change ModuleInterface for support of drag-and-drop of plug-in files
This commit is contained in:
@@ -158,7 +158,7 @@ bool AudioUnitEffectsModule::AutoRegisterPlugins(PluginManagerInterface & pm)
|
||||
return true;
|
||||
}
|
||||
|
||||
wxArrayString AudioUnitEffectsModule::FindPlugins(PluginManagerInterface & pm)
|
||||
wxArrayString AudioUnitEffectsModule::FindPluginPaths(PluginManagerInterface & pm)
|
||||
{
|
||||
wxArrayString effects;
|
||||
|
||||
@@ -171,9 +171,9 @@ wxArrayString AudioUnitEffectsModule::FindPlugins(PluginManagerInterface & pm)
|
||||
return effects;
|
||||
}
|
||||
|
||||
bool AudioUnitEffectsModule::RegisterPlugin(PluginManagerInterface & pm,
|
||||
const wxString & path,
|
||||
wxString &errMsg)
|
||||
unsigned AudioUnitEffectsModule::DiscoverPluginsAtPath(
|
||||
const wxString & path, wxString &errMsg,
|
||||
const RegistrationCallback &callback)
|
||||
{
|
||||
errMsg.clear();
|
||||
wxString name;
|
||||
@@ -181,7 +181,7 @@ bool AudioUnitEffectsModule::RegisterPlugin(PluginManagerInterface & pm,
|
||||
if (component == NULL)
|
||||
{
|
||||
errMsg = _("Could not find component");
|
||||
return false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
AudioUnitEffect effect(path, name, component);
|
||||
@@ -190,12 +190,11 @@ bool AudioUnitEffectsModule::RegisterPlugin(PluginManagerInterface & pm,
|
||||
// TODO: Is it worth it to discriminate all the ways SetHost might
|
||||
// return false?
|
||||
errMsg = _("Could not initialize component");
|
||||
return false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
pm.RegisterPlugin(this, &effect);
|
||||
|
||||
return true;
|
||||
callback(this, &effect);
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool AudioUnitEffectsModule::IsPluginValid(
|
||||
|
@@ -243,10 +243,15 @@ public:
|
||||
bool Initialize() override;
|
||||
void Terminate() override;
|
||||
|
||||
bool PathsAreFiles() override { return false; }
|
||||
wxString InstallPath() override { return {}; }
|
||||
|
||||
bool AutoRegisterPlugins(PluginManagerInterface & pm) override;
|
||||
wxArrayString FindPlugins(PluginManagerInterface & pm) override;
|
||||
bool RegisterPlugin(PluginManagerInterface & pm,
|
||||
const wxString & path, wxString &errMsg) override;
|
||||
wxArrayString FindPluginPaths(PluginManagerInterface & pm) override;
|
||||
unsigned DiscoverPluginsAtPath(
|
||||
const wxString & path, wxString &errMsg,
|
||||
const RegistrationCallback &callback)
|
||||
override;
|
||||
|
||||
bool IsPluginValid(const wxString & path, bool bFast) override;
|
||||
|
||||
|
Reference in New Issue
Block a user