mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-19 17:11:12 +02:00
Use type aliases PluginPath, PluginPaths...
... for wxString and vector thereof, when holding plugin paths (which may or may not be interpreted as file paths, depending on the module); to be replaced later with different types
This commit is contained in:
@@ -70,7 +70,7 @@ VampEffectsModule::~VampEffectsModule()
|
||||
// ComponentInterface implementation
|
||||
// ============================================================================
|
||||
|
||||
wxString VampEffectsModule::GetPath()
|
||||
PluginPath VampEffectsModule::GetPath()
|
||||
{
|
||||
return mPath;
|
||||
}
|
||||
@@ -117,9 +117,9 @@ bool VampEffectsModule::AutoRegisterPlugins(PluginManagerInterface & WXUNUSED(pm
|
||||
return false;
|
||||
}
|
||||
|
||||
wxArrayString VampEffectsModule::FindPluginPaths(PluginManagerInterface & WXUNUSED(pm))
|
||||
PluginPaths VampEffectsModule::FindPluginPaths(PluginManagerInterface & WXUNUSED(pm))
|
||||
{
|
||||
wxArrayString names;
|
||||
PluginPaths names;
|
||||
|
||||
PluginLoader *loader = PluginLoader::getInstance();
|
||||
|
||||
@@ -195,7 +195,7 @@ wxArrayString VampEffectsModule::FindPluginPaths(PluginManagerInterface & WXUNUS
|
||||
}
|
||||
|
||||
unsigned VampEffectsModule::DiscoverPluginsAtPath(
|
||||
const wxString & path, wxString &errMsg,
|
||||
const PluginPath & path, wxString &errMsg,
|
||||
const RegistrationCallback &callback)
|
||||
{
|
||||
errMsg.clear();
|
||||
@@ -216,7 +216,7 @@ unsigned VampEffectsModule::DiscoverPluginsAtPath(
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool VampEffectsModule::IsPluginValid(const wxString & path, bool bFast)
|
||||
bool VampEffectsModule::IsPluginValid(const PluginPath & path, bool bFast)
|
||||
{
|
||||
int output;
|
||||
bool hasParameters;
|
||||
@@ -227,7 +227,7 @@ bool VampEffectsModule::IsPluginValid(const wxString & path, bool bFast)
|
||||
return bool(vp);
|
||||
}
|
||||
|
||||
ComponentInterface *VampEffectsModule::CreateInstance(const wxString & path)
|
||||
ComponentInterface *VampEffectsModule::CreateInstance(const PluginPath & path)
|
||||
{
|
||||
// Acquires a resource for the application.
|
||||
int output;
|
||||
@@ -252,7 +252,7 @@ void VampEffectsModule::DeleteInstance(ComponentInterface *instance)
|
||||
|
||||
// VampEffectsModule implementation
|
||||
|
||||
std::unique_ptr<Vamp::Plugin> VampEffectsModule::FindPlugin(const wxString & path,
|
||||
std::unique_ptr<Vamp::Plugin> VampEffectsModule::FindPlugin(const PluginPath & path,
|
||||
int & output,
|
||||
bool & hasParameters)
|
||||
{
|
||||
|
@@ -30,7 +30,7 @@ public:
|
||||
|
||||
// ComponentInterface implementation
|
||||
|
||||
wxString GetPath() override;
|
||||
PluginPath GetPath() override;
|
||||
ComponentInterfaceSymbol GetSymbol() override;
|
||||
VendorSymbol GetVendor() override;
|
||||
wxString GetVersion() override;
|
||||
@@ -45,27 +45,27 @@ public:
|
||||
wxString InstallPath() override { return {}; }
|
||||
|
||||
bool AutoRegisterPlugins(PluginManagerInterface & pm) override;
|
||||
wxArrayString FindPluginPaths(PluginManagerInterface & pm) override;
|
||||
PluginPaths FindPluginPaths(PluginManagerInterface & pm) override;
|
||||
unsigned DiscoverPluginsAtPath(
|
||||
const wxString & path, wxString &errMsg,
|
||||
const PluginPath & path, wxString &errMsg,
|
||||
const RegistrationCallback &callback)
|
||||
override;
|
||||
|
||||
bool IsPluginValid(const wxString & path, bool bFast) override;
|
||||
bool IsPluginValid(const PluginPath & path, bool bFast) override;
|
||||
|
||||
ComponentInterface *CreateInstance(const wxString & path) override;
|
||||
ComponentInterface *CreateInstance(const PluginPath & path) override;
|
||||
void DeleteInstance(ComponentInterface *instance) override;
|
||||
|
||||
private:
|
||||
// VampEffectModule implementation
|
||||
|
||||
std::unique_ptr<Vamp::Plugin> FindPlugin(const wxString & wpath,
|
||||
std::unique_ptr<Vamp::Plugin> FindPlugin(const PluginPath & wpath,
|
||||
int & output,
|
||||
bool & hasParameters);
|
||||
|
||||
private:
|
||||
ModuleManagerInterface *mModMan;
|
||||
wxString mPath;
|
||||
PluginPath mPath;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -66,7 +66,7 @@ BEGIN_EVENT_TABLE(VampEffect, wxEvtHandler)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
VampEffect::VampEffect(std::unique_ptr<Vamp::Plugin> &&plugin,
|
||||
const wxString & path,
|
||||
const PluginPath & path,
|
||||
int output,
|
||||
bool hasParameters)
|
||||
: mPlugin(std::move(plugin)),
|
||||
@@ -87,7 +87,7 @@ VampEffect::~VampEffect()
|
||||
// ComponentInterface implementation
|
||||
// ============================================================================
|
||||
|
||||
wxString VampEffect::GetPath()
|
||||
PluginPath VampEffect::GetPath()
|
||||
{
|
||||
return mPath;
|
||||
}
|
||||
|
@@ -39,14 +39,14 @@ class VampEffect final : public Effect
|
||||
{
|
||||
public:
|
||||
VampEffect(std::unique_ptr<Vamp::Plugin> &&plugin,
|
||||
const wxString & path,
|
||||
const PluginPath & path,
|
||||
int output,
|
||||
bool hasParameters);
|
||||
virtual ~VampEffect();
|
||||
|
||||
// ComponentInterface implementation
|
||||
|
||||
wxString GetPath() override;
|
||||
PluginPath GetPath() override;
|
||||
ComponentInterfaceSymbol GetSymbol() override;
|
||||
VendorSymbol GetVendor() override;
|
||||
wxString GetVersion() override;
|
||||
@@ -88,7 +88,7 @@ private:
|
||||
|
||||
private:
|
||||
std::unique_ptr<Vamp::Plugin> mPlugin;
|
||||
wxString mPath;
|
||||
PluginPath mPath;
|
||||
int mOutput;
|
||||
bool mHasParameters;
|
||||
|
||||
|
Reference in New Issue
Block a user