1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-08 22:23:59 +01:00

Fixes StereoToMono effect

The problem is that lookup of effects is based on their
ID and legacy effects didn't play well in this scheme, so
I've added a workaround for now.  This will go away when
I get all of the effects converted.

And removes some debugging.
This commit is contained in:
lllucius
2014-12-07 19:27:06 +00:00
parent 2803bcd67a
commit 9ce427f283
3 changed files with 29 additions and 3 deletions

View File

@@ -175,7 +175,30 @@ wxString Effect::GetName()
return mClient->GetName();
}
return GetEffectIdentifier();
// Break up identifier into words based on caps
//
// EffectManager::GetEffectIdentifier() CamelCases identifiers based on
// blank delimited words. But not all legacy effects have blank delimted
// words and were manually CamelCased. So use that to break up the ident
// into words
//
// This is only temporary and will go away when the legacy effects
// get converted.
//
wxString ident = GetEffectIdentifier();
wxString name;
for (size_t i = 0, cnt = ident.Len(); i < cnt; i++)
{
wxChar c = ident.GetChar(i);
if (wxIsupper(c) && i != 0)
{
name += wxT(' ');
}
name += c;
}
return name;
}
wxString Effect::GetVendor()

View File

@@ -11,7 +11,6 @@
#include "../Audacity.h"
#include <wx/log.h>
#include <wx/msgdlg.h>
#include <wx/stopwatch.h>
#include <wx/tokenzr.h>
@@ -730,7 +729,6 @@ const PluginID & EffectManager::GetEffectByIdentifier(const wxString & strTarget
const PluginDescriptor *plug = pm.GetFirstPlugin(PluginTypeEffect);
while (plug)
{
wxLogDebug(wxT("id %s --- %s"), plug->GetID(), strTarget);
if (GetEffectIdentifier(plug->GetID()).IsSameAs(strTarget))
{
return plug->GetID();

View File

@@ -40,6 +40,11 @@ public:
virtual bool Init();
virtual void End();
virtual bool CheckWhetherSkipEffect();
virtual bool PromptUser() {
return true;
}
protected:
virtual bool Process();