87 wxWindow &parent, wxDialog &dialog,
101 auto parent =
S.GetParent();
113 auto pParent =
S.GetParent();
115 auto& vst2Instance =
dynamic_cast<VSTInstance&
>(instance);
117 auto editor = std::make_unique<VSTEditor>(
122 vst2Instance.SetOwningValidator(editor.get());
128 editor->BuildFancy(instance);
158 path =
SelectFile(FileNames::Operation::Presets,
159 XO(
"Save VST Preset As:"),
164 {
XO(
"Standard VST bank file"), {
wxT(
"fxb") },
true },
165 {
XO(
"Standard VST program file"), {
wxT(
"fxp") },
true },
166 {
XO(
"Audacity VST preset file"), {
wxT(
"xml") },
true },
168 wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
181 wxString ext =
fn.GetExt();
182 if (ext.CmpNoCase(
wxT(
"fxb")) == 0)
186 else if (ext.CmpNoCase(
wxT(
"fxp")) == 0)
190 else if (ext.CmpNoCase(
wxT(
"xml")) == 0)
199 XO(
"Unrecognized file extension."),
200 XO(
"Error Saving VST Presets"),
216 auto temp = std::make_unique<VSTEffect>(this->
mPath);
217 if (!temp->InitializePlugin())
219 return temp->ImportPresetsNC(
settings);
227 path =
SelectFile(FileNames::Operation::Presets,
228 XO(
"Load VST Preset:"),
233 XO(
"VST preset files"),
237 wxFD_OPEN | wxRESIZE_BORDER,
247 wxString ext =
fn.GetExt();
248 bool success =
false;
249 if (ext.CmpNoCase(
wxT(
"fxb")) == 0)
253 else if (ext.CmpNoCase(
wxT(
"fxp")) == 0)
257 else if (ext.CmpNoCase(
wxT(
"xml")) == 0)
265 XO(
"Unrecognized file extension."),
266 XO(
"Error Loading VST Presets"),
276 XO(
"Unable to load presets file."),
277 XO(
"Error Loading VST Presets"),
297static VSTEffectsModule::Factory::SubstituteInUnique<VSTEffect>
scope;
int AudacityMessageBox(const TranslatableString &message, const TranslatableString &caption, long style, wxWindow *parent, int x, int y)
std::optional< std::unique_ptr< EffectSettingsAccess::Message > > OptionalMessage
FilePath SelectFile(FileNames::Operation op, const TranslatableString &message, const FilePath &default_path, const FilePath &default_filename, const FileExtension &default_extension, const FileTypes &fileTypes, int flags, wxWindow *parent)
static Settings & settings()
DEFINE_LOCAL_EVENT_TYPE(EVT_UPDATEDISPLAY)
wxDEFINE_EVENT(EVT_SIZEWINDOW, wxCommandEvent)
static VSTEffectsModule::Factory::SubstituteInUnique< VSTEffect > scope
bool SupportsRealtime() const
Performs effect computation.
Hold values to send to effect output meters.
Factory of instances of an effect.
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
int ShowDialog(bool nonModal)
EffectType GetType() const override
Type determines how it behaves.
std::unique_ptr< EffectEditor > PopulateUI(const EffectPlugin &plugin, ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs) const override
Adds controls to a panel that is given as the parent window of S
int ShowClientInterface(const EffectPlugin &plugin, wxWindow &parent, wxDialog &dialog, EffectEditor *pEditor, bool forceModal) const override
OptionalMessage ImportPresetsNC(EffectSettings &settings)
virtual std::unique_ptr< EffectEditor > MakeEditor(ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs) const final
Will never be called.
void ShowOptions(const EffectPlugin &plugin) const override
void ExportPresets(const EffectPlugin &plugin, const EffectSettings &settings) const override
OptionalMessage ImportPresets(const EffectPlugin &plugin, EffectSettings &settings) const override
bool GetConfig(const EffectDefinitionInterface &ident, ConfigurationType type, const RegistryPath &group, const RegistryPath &key, Value &var, const Value &defval)
Externalized state of a plug-in.
void SaveFXP(const wxFileName &fn) const
bool FetchSettings(VSTSettings &vst3Settings, bool doFetch=true) const
static VSTSettings & GetSettings(EffectSettings &settings)
bool LoadXML(const wxFileName &fn)
bool StoreSettings(const VSTSettings &vst3settings) const
void SaveFXB(const wxFileName &fn) const
bool LoadFXP(const wxFileName &fn)
std::unique_ptr< EffectInstance::Message > MakeMessageFS(const VSTSettings &settings) const
void SaveXML(const wxFileName &fn) const
bool LoadFXB(const wxFileName &fn)