29#include <wx/control.h>
34#include <wx/evtloop.h>
37#include <wx/filename.h>
39#include <wx/listctrl.h>
41#include <wx/settings.h>
42#include <wx/stattext.h>
43#include <wx/textctrl.h>
48#include "../../widgets/valnum.h"
63#define PRESET_FORMAT kCFPropertyListBinaryFormat_v1_0
66#define PRESET_KEY wxT("Data")
69#define PRESET_LOCAL_PATH wxT("/Library/Audio/Presets")
70#define PRESET_USER_PATH wxT("~/Library/Audio/Presets")
80 Float64 tailTime = 0.0;
82 return tailTime * mSampleRate;
88 wxWindow &parent, wxDialog &dialog,
95 return dialog.ShowModal();
119#if defined(HAVE_AUDIOUNIT_BASIC_SUPPORT)
120bool AudioUnitEffect::CreatePlain(wxWindow *parent)
130#ifdef __WX_EVTLOOP_BUSY_WAITING__
131 wxEventLoop::SetBusyWaiting(
false);
148 if (!
fn.Mkdir(
fn.GetFullPath(), 0755, wxPATH_MKDIR_FULL)) {
149 wxLogError(
wxT(
"Couldn't create the \"%s\" directory"),
fn.GetPath());
157 path =
SelectFile(FileNames::Operation::_None,
158 XO(
"Export Audio Unit Preset As %s:").
Format(
fn.GetFullPath()),
163 {
XO(
"Standard Audio Unit preset file"), {
wxT(
"aupreset") },
true },
165 wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
175 XO(
"Could not export \"%s\" preset\n\n%s").
Format(path, msg),
176 XO(
"Export Audio Unit Presets"),
195 path =
SelectFile(FileNames::Operation::_None,
196 XO(
"Import Audio Unit Preset As %s:").
Format(
fn.GetFullPath()),
197 fn.GetFullPath(), wxEmptyString,
wxT(
"aupreset"),
199 {
XO(
"Standard Audio Unit preset file"), {
wxT(
"aupreset") },
true },
201 wxFD_OPEN | wxRESIZE_BORDER,
211 XO(
"Could not import \"%s\" preset\n\n%s").
Format(path, msg),
212 XO(
"Import Audio Unit Presets"),
226static AudioUnitEffectsModule::Factory::SubstituteInUnique<AudioUnitEffect>
scope;
int AudacityMessageBox(const TranslatableString &message, const TranslatableString &caption, long style, wxWindow *parent, int x, int y)
static AudioUnitEffectsModule::Factory::SubstituteInUnique< AudioUnitEffect > scope
constexpr auto OptionsKey
static const auto FullValue
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()
static std::unique_ptr< EffectEditor > Create(const EffectUIServices &effect, ShuttleGui &S, const wxString &uiType, EffectInstance &instance, EffectSettingsAccess &access)
TranslatableString Export(const AudioUnitEffectSettings &settings, const wxString &path) const
TranslatableString Import(AudioUnitEffectSettings &settings, const wxString &path) const
EffectType GetType() const override
Type determines how it behaves.
~AudioUnitEffect() override
void ExportPresets(const EffectPlugin &plugin, const EffectSettings &settings) const override
virtual std::unique_ptr< EffectEditor > MakeEditor(ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs) const final
Will never be called.
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
void ShowOptions(const EffectPlugin &plugin) const override
OptionalMessage ImportPresets(const EffectPlugin &plugin, EffectSettings &settings) const override
int ShowClientInterface(const EffectPlugin &plugin, wxWindow &parent, wxDialog &dialog, EffectEditor *pEditor, bool forceModal) const override
bool CloseUI() const override
bool SupportsRealtime() const
Performs effect computation.
virtual size_t GetTailSize() const
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.
bool GetConfig(const EffectDefinitionInterface &ident, ConfigurationType type, const RegistryPath &group, const RegistryPath &key, Value &var, const Value &defval)
OSStatus GetFixedSizeProperty(AudioUnitPropertyID inID, T &property, AudioUnitScope inScope=kAudioUnitScope_Global, AudioUnitElement inElement=0) const
static AudioUnitEffectSettings & GetSettings(EffectSettings &settings)
Externalized state of a plug-in.