Audacity 3.2.0
Functions
anonymous_namespace{VST3Effect.cpp} Namespace Reference

Functions

wxString GetFactoryPresetsBasePath ()
 
wxString GetPresetsPath (const wxString &basePath, const VST3::Hosting::ClassInfo &effectClassInfo)
 
wxString GetFactoryPresetsPath (const VST3::Hosting::ClassInfo &effectClassInfo)
 

Function Documentation

◆ GetFactoryPresetsBasePath()

wxString anonymous_namespace{VST3Effect.cpp}::GetFactoryPresetsBasePath ( )

Definition at line 52 of file VST3Effect.cpp.

53{
54#ifdef __WXMSW__
55 PWSTR commonFolderPath { nullptr };
56 auto cleanup = finally([&](){ CoTaskMemFree(commonFolderPath); });
57 if(SHGetKnownFolderPath(FOLDERID_ProgramData, KF_FLAG_DEFAULT , NULL, &commonFolderPath) == S_OK)
58 return wxString(commonFolderPath) + "\\VST3 Presets\\";
59 return {};
60#elif __WXMAC__
61 return wxString("Library/Audio/Presets/");
62#elif __WXGTK__
63 return wxString("/usr/local/share/vst3/presets/");
64#endif
65}

Referenced by GetFactoryPresetsPath().

Here is the caller graph for this function:

◆ GetFactoryPresetsPath()

wxString anonymous_namespace{VST3Effect.cpp}::GetFactoryPresetsPath ( const VST3::Hosting::ClassInfo &  effectClassInfo)

Definition at line 85 of file VST3Effect.cpp.

86{
87 return GetPresetsPath(
89 effectClassInfo
90 );
91}
wxString GetPresetsPath(const wxString &basePath, const VST3::Hosting::ClassInfo &effectClassInfo)
Definition: VST3Effect.cpp:67

References GetFactoryPresetsBasePath(), and GetPresetsPath().

Referenced by VST3Effect::GetFactoryPresets(), and VST3Effect::LoadFactoryPreset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetPresetsPath()

wxString anonymous_namespace{VST3Effect.cpp}::GetPresetsPath ( const wxString &  basePath,
const VST3::Hosting::ClassInfo &  effectClassInfo 
)

Definition at line 67 of file VST3Effect.cpp.

68{
69 wxRegEx fixName(R"([\\*?/:<>|])");
70 wxString companyName = wxString (effectClassInfo.vendor()).Trim();
71 wxString pluginName = wxString (effectClassInfo.name()).Trim();
72
73 fixName.ReplaceAll( &companyName, { "_" });
74 fixName.ReplaceAll( &pluginName, { "_" });
75
76 wxFileName result;
77 result.SetPath(basePath);
78 result.AppendDir(companyName);
79 result.AppendDir(pluginName);
80 auto path = result.GetPath();
81
82 return path;
83}

Referenced by GetFactoryPresetsPath().

Here is the caller graph for this function: