mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-22 15:20:15 +02:00
Fix Windows build
This commit is contained in:
parent
765ca0c813
commit
2e8a73bab1
@ -116,7 +116,8 @@ public:
|
|||||||
// even if some plugins are also discovered successfully.
|
// even if some plugins are also discovered successfully.
|
||||||
// Return value is the number of plugins found.
|
// Return value is the number of plugins found.
|
||||||
using RegistrationCallback =
|
using RegistrationCallback =
|
||||||
std::function< void(ModuleInterface *, EffectIdentInterface *) >;
|
std::function<
|
||||||
|
const PluginID &(ModuleInterface *, EffectIdentInterface *) >;
|
||||||
virtual unsigned DiscoverPluginsAtPath(
|
virtual unsigned DiscoverPluginsAtPath(
|
||||||
const wxString & path, wxString &errMsg,
|
const wxString & path, wxString &errMsg,
|
||||||
const RegistrationCallback &callback =
|
const RegistrationCallback &callback =
|
||||||
|
@ -1761,8 +1761,8 @@ bool PluginManager::DropFile(const wxString &fileName)
|
|||||||
if (!ff.empty() && module->PathsAreFiles()) {
|
if (!ff.empty() && module->PathsAreFiles()) {
|
||||||
wxString errMsg;
|
wxString errMsg;
|
||||||
// Do dry-run test of the file format
|
// Do dry-run test of the file format
|
||||||
unsigned nPlugIns = module->DiscoverPluginsAtPath(fileName, errMsg,
|
unsigned nPlugIns =
|
||||||
[](ModuleInterface *, EffectIdentInterface *){});
|
module->DiscoverPluginsAtPath(fileName, errMsg, {});
|
||||||
if (nPlugIns) {
|
if (nPlugIns) {
|
||||||
// File contents are good for this module, so check no others.
|
// File contents are good for this module, so check no others.
|
||||||
// All branches of this block return true, even in case of
|
// All branches of this block return true, even in case of
|
||||||
@ -1813,10 +1813,12 @@ bool PluginManager::DropFile(const wxString &fileName)
|
|||||||
[&](ModuleInterface *provider, EffectIdentInterface *ident){
|
[&](ModuleInterface *provider, EffectIdentInterface *ident){
|
||||||
// Register as by default, but also collecting the PluginIDs
|
// Register as by default, but also collecting the PluginIDs
|
||||||
// and names
|
// and names
|
||||||
ids.push_back(
|
const auto &id =
|
||||||
PluginManagerInterface::DefaultRegistrationCallback(
|
PluginManagerInterface::DefaultRegistrationCallback(
|
||||||
provider, ident) );
|
provider, ident);
|
||||||
|
ids.push_back(id);
|
||||||
names.push_back( wxGetTranslation( ident->GetName() ) );
|
names.push_back( wxGetTranslation( ident->GetName() ) );
|
||||||
|
return id;
|
||||||
});
|
});
|
||||||
if ( ! nPlugIns ) {
|
if ( ! nPlugIns ) {
|
||||||
// Unlikely after the dry run succeeded
|
// Unlikely after the dry run succeeded
|
||||||
|
@ -319,6 +319,7 @@ unsigned BuiltinEffectsModule::DiscoverPluginsAtPath(
|
|||||||
auto effect = Instantiate(path);
|
auto effect = Instantiate(path);
|
||||||
if (effect)
|
if (effect)
|
||||||
{
|
{
|
||||||
|
if (callback)
|
||||||
callback(this, effect.get());
|
callback(this, effect.get());
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -630,6 +630,7 @@ unsigned VSTEffectsModule::DiscoverPluginsAtPath(
|
|||||||
if (!skip && cont)
|
if (!skip && cont)
|
||||||
{
|
{
|
||||||
valid = true;
|
valid = true;
|
||||||
|
if (callback)
|
||||||
callback( this, &proc );
|
callback( this, &proc );
|
||||||
++nFound;
|
++nFound;
|
||||||
}
|
}
|
||||||
|
@ -193,7 +193,9 @@ unsigned AudioUnitEffectsModule::DiscoverPluginsAtPath(
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(callback)
|
||||||
callback(this, &effect);
|
callback(this, &effect);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -250,6 +250,7 @@ unsigned LadspaEffectsModule::DiscoverPluginsAtPath(
|
|||||||
LadspaEffect effect(path, index);
|
LadspaEffect effect(path, index);
|
||||||
if (effect.SetHost(NULL)) {
|
if (effect.SetHost(NULL)) {
|
||||||
++nLoaded;
|
++nLoaded;
|
||||||
|
if (callback)
|
||||||
callback( this, &effect );
|
callback( this, &effect );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -253,6 +253,7 @@ unsigned LV2EffectsModule::DiscoverPluginsAtPath(
|
|||||||
LV2Effect effect(plug);
|
LV2Effect effect(plug);
|
||||||
if (effect.SetHost(NULL))
|
if (effect.SetHost(NULL))
|
||||||
{
|
{
|
||||||
|
if (callback)
|
||||||
callback( this, &effect );
|
callback( this, &effect );
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -223,6 +223,7 @@ unsigned NyquistEffectsModule::DiscoverPluginsAtPath(
|
|||||||
NyquistEffect effect(path);
|
NyquistEffect effect(path);
|
||||||
if (effect.IsOk())
|
if (effect.IsOk())
|
||||||
{
|
{
|
||||||
|
if (callback)
|
||||||
callback(this, &effect);
|
callback(this, &effect);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -211,6 +211,7 @@ unsigned VampEffectsModule::DiscoverPluginsAtPath(
|
|||||||
if (vp)
|
if (vp)
|
||||||
{
|
{
|
||||||
VampEffect effect(std::move(vp), path, output, hasParameters);
|
VampEffect effect(std::move(vp), path, output, hasParameters);
|
||||||
|
if (callback)
|
||||||
callback( this, &effect );
|
callback( this, &effect );
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user