30#include <wx/control.h>
36#include <wx/evtloop.h>
39#include <wx/filename.h>
41#include <wx/listctrl.h>
44#include <wx/settings.h>
45#include <wx/stattext.h>
46#include <wx/textctrl.h>
48#include "../../SelectFile.h"
49#include "../../ShuttleGui.h"
50#include "../../widgets/AudacityMessageBox.h"
51#include "../../widgets/valnum.h"
66#define PRESET_FORMAT kCFPropertyListBinaryFormat_v1_0
69#define PRESET_KEY wxT("Data")
72#define PRESET_LOCAL_PATH wxT("/Library/Audio/Presets")
73#define PRESET_USER_PATH wxT("~/Library/Audio/Presets")
79#define USE_EXTENDED_NAMES
88 bool Get(AudioUnit mUnit, AudioUnitParameterID parmID)
95 kAudioUnitProperty_ParameterInfo,
info,
96 kAudioUnitScope_Global, parmID))
99 if (
info.flags & kAudioUnitParameterFlag_HasCFNameString)
100 name = wxCFStringRef::AsString(
info.cfNameString);
104#if defined(USE_EXTENDED_NAMES)
120 name = wxString::Format(wxT(
"%c%s%x%c"),
134 if (
info.flags & kAudioUnitParameterFlag_HasClump)
138 info.clumpID, kAudioUnitParameterName_Full
142 kAudioUnitProperty_ParameterClumpName, clumpInfo)) {
143 clumpName = wxCFStringRef::AsString(clumpInfo.outName);
144 clumpName.Replace(
idBeg, wxT(
'_'));
145 clumpName.Replace(
idSep, wxT(
'_'));
146 clumpName.Replace(
idEnd, wxT(
'_'));
147 clumpName.Append(
idSep);
149 name = wxString::Format(wxT(
"%c%s%x%c%s"),
171 const void *blob,
size_t len,
bool allowEmpty)
const
174 auto parms = wxBase64Encode(blob, len);
175 if (!allowEmpty && parms.IsEmpty())
176 return XO(
"Failed to encode preset from \"%s\"").Format(path);
180 return XO(
"Unable to store preset in config file");
191 const wxString &
name,
192 AudioComponent component,
196 , mName{
name.AfterFirst(wxT(
':')).Trim(true).Trim(false) }
197 , mVendor{
name.BeforeFirst(wxT(
':')).Trim(true).Trim(false) }
229 OSStatus result = AudioComponentGetVersion(
mComponent, &version);
231 return wxString::Format(wxT(
"%d.%d.%d"),
232 (version >> 16) & 0xffff,
233 (version >> 8) & 0xff,
292 for (
const auto &ID : array) {
295 if (pi.
info.flags & kAudioUnitParameterFlag_IsWritable)
305 auto result = AudioComponentInstanceNew(
mComponent, &unit);
308 return (!result && unit !=
nullptr);
322 kAudioUnitProperty_MaximumFramesPerSlice,
mBlockSize))
342 return std::make_shared<Instance>(*
this);
384 AUEventListenerRef eventListenerRef{};
387 (CFRunLoopRef)GetCFRunLoopFromEventLoop(GetCurrentEventLoop()),
388 kCFRunLoopDefaultMode,
396 AudioUnitEvent event;
398 event.mEventType = kAudioUnitEvent_ParameterValueChange;
399 event.mArgument.mParameter.mAudioUnit =
mUnit.get();
400 event.mArgument.mParameter.mScope = kAudioUnitScope_Global;
401 event.mArgument.mParameter.mElement = 0;
409 for (
const auto &ID : array) {
410 event.mArgument.mParameter.mParameterID = ID;
415 event.mEventType = kAudioUnitEvent_PropertyChange;
416 event.mArgument.mProperty.mAudioUnit =
mUnit.get();
417 event.mArgument.mProperty.mPropertyID = kAudioUnitProperty_Latency;
418 event.mArgument.mProperty.mScope = kAudioUnitScope_Global;
419 event.mArgument.mProperty.mElement = 0;
432 AudioUnitCocoaViewInfo cocoaViewInfo;
438 AudioComponentDescription compDesc;
487 Float64 latency = 0.0;
498size_t AudioUnitEffect::GetTailSize()
const
501 Float64 tailTime = 0.0;
516 memset(&
mTimeStamp, 0,
sizeof(AudioTimeStamp));
519 mTimeStamp.mFlags = kAudioTimeStampSampleTimeValid;
524 if (
SetProperty(kAudioUnitProperty_SetRenderCallback,
526 kAudioUnitScope_Input)) {
527 wxLogError(
"Setting input render callback failed.\n");
531 if (AudioUnitReset(
mUnit.get(), kAudioUnitScope_Global, 0))
549 const float *
const *inBlock,
float *
const *outBlock,
size_t blockLen)
555 mInputList[i] = { 1,
static_cast<UInt32
>(
sizeof(float) * blockLen),
556 const_cast<float*
>(inBlock[i]) };
561 mOutputList[i] = { 1,
static_cast<UInt32
>(
sizeof(float) * blockLen),
564 AudioUnitRenderActionFlags flags = 0;
567 result = AudioUnitRender(
mUnit.get(),
573 if (result != noErr) {
574 wxLogError(
"Render failed: %d %4.4s\n",
575 static_cast<int>(result),
reinterpret_cast<char *
>(&result));
592 if (!slave->InitializeInstance())
596 slave->SetSampleRate(sampleRate);
603 auto pSlave = slave.get();
604 mSlaves.push_back(std::move(slave));
606 return pSlave->ProcessInitialize(
settings, 0,
nullptr);
611return GuardedCall<bool>([&]{
612 for (
size_t i = 0, cnt = mSlaves.size(); i < cnt; i++)
614 mSlaves[i]->ProcessFinalize();
617 return ProcessFinalize();
628 for (
size_t i = 0, cnt =
mSlaves.size(); i < cnt; i++)
641return GuardedCall<bool>([&]{
647 for (
size_t i = 0, cnt =
mSlaves.size(); i < cnt; i++)
649 if (!mSlaves[i]->BypassEffect(false))
665 const float *
const *inbuf,
float *
const *outbuf,
size_t numSamples)
668 return mSlaves[group]->ProcessBlock(
settings, inbuf, outbuf, numSamples);
677 wxWindow &parent, wxDialog &dialog,
bool forceModal)
696 for (
const auto &ID : array) {
703 AudioUnitParameterValue value;
704 if (AudioUnitGetParameter(
mUnit.get(), ID, kAudioUnitScope_Global, 0,
710 parms.Write(pi.
name, value);
721 for (
const auto &ID : array) {
729 if (parms.Read(pi.
name, &d)) {
730 if (AudioUnitSetParameter(
mUnit.get(), ID, kAudioUnitScope_Global,
755 CF_ptr<CFArrayRef> array;
757 id < 0 || id >= CFArrayGetCount(array.get()))
761 *
static_cast<const AUPreset*
>(CFArrayGetValueAtIndex(array.get(),
id)))) {
763 Notify(
mUnit.get(), kAUParameterListener_AnyParameter);
774 CF_ptr<CFArrayRef> array;
776 for (CFIndex i = 0, cnt = CFArrayGetCount(array.get()); i < cnt; ++i)
777 presets.push_back(wxCFStringRef::AsString(
778 static_cast<const AUPreset*
>(CFArrayGetValueAtIndex(array.get(), i))
792 auto parent =
S.GetParent();
793 mDialog =
static_cast<wxDialog *
>(wxGetTopLevelParent(parent));
799 auto mainSizer = std::make_unique<wxBoxSizer>(wxVERTICAL);
803 mainSizer->Add(container, 1, wxEXPAND);
805 mParent->SetSizer(mainSizer.release());
808#if defined(HAVE_AUDIOUNIT_BASIC_SUPPORT)
827 auto innerSizer = std::make_unique<wxBoxSizer>(wxVERTICAL);
829 innerSizer->Add((
mpControl = pControl.release()), 1, wxEXPAND);
830 container->SetSizer(innerSizer.release());
833 mParent->SetMinSize(wxDefaultSize);
836#ifdef __WX_EVTLOOP_BUSY_WAITING__
837 wxEventLoop::SetBusyWaiting(
true);
844 mParent->PushEventHandler(
this);
847 return std::make_unique<DefaultEffectUIValidator>(*
this, access);
852 return mUIType != wxT(
"Plain");
859 settings.extra.SetDuration(mDuration->GetValue());
864#if defined(HAVE_AUDIOUNIT_BASIC_SUPPORT)
865bool AudioUnitEffect::CreatePlain(wxWindow *parent)
875#ifdef __WX_EVTLOOP_BUSY_WAITING__
876 wxEventLoop::SetBusyWaiting(
false);
880 mParent->RemoveEventHandler(
this);
908 if (!
fn.Mkdir(
fn.GetFullPath(), 0755, wxPATH_MKDIR_FULL))
910 wxLogError(wxT(
"Couldn't create the \"%s\" directory"),
fn.GetPath());
918 path =
SelectFile(FileNames::Operation::_None,
919 XO(
"Export Audio Unit Preset As %s:").
Format(
fn.GetFullPath()),
924 {
XO(
"Standard Audio Unit preset file"), { wxT(
"aupreset") },
true },
926 wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
939 XO(
"Could not export \"%s\" preset\n\n%s").
Format(path, msg),
940 XO(
"Export Audio Unit Presets"),
960 path =
SelectFile(FileNames::Operation::_None,
961 XO(
"Import Audio Unit Preset As %s:").
Format(
fn.GetFullPath()),
966 {
XO(
"Standard Audio Unit preset file"), { wxT(
"aupreset") },
true },
968 wxFD_OPEN | wxRESIZE_BORDER,
981 XO(
"Could not import \"%s\" preset\n\n%s").
Format(path, msg),
982 XO(
"Import Audio Unit Presets"),
996 if (dlg.ShowModal()) {
1015 parms, wxEmptyString)) {
1021 group, wxT(
"Parameters"));
1036 if (!error.empty()) {
1037 wxLogError(error.Debug());
1046 Notify(
mUnit.get(), kAUParameterListener_AnyParameter);
1051 const RegistryPath &group,
const wxMemoryBuffer &buf)
const
1053 size_t bufLen = buf.GetDataLen();
1055 return XO(
"Failed to decode \"%s\" preset").Format(group);
1058 const auto bufPtr =
static_cast<const uint8_t *
>(buf.GetData());
1059 CF_ptr<CFDataRef> data{ CFDataCreateWithBytesNoCopy(kCFAllocatorDefault,
1060 bufPtr, bufLen, kCFAllocatorNull)
1063 return XO(
"Failed to convert \"%s\" preset to internal format")
1067 CF_ptr<CFPropertyListRef> content{
1068 CFPropertyListCreateWithData(kCFAllocatorDefault,
1069 data.get(), kCFPropertyListImmutable,
nullptr,
1074 return XO(
"Failed to create property list for \"%s\" preset")
1078 if (
SetProperty(kAudioUnitProperty_ClassInfo, content.get()))
1079 return XO(
"Failed to set class info for \"%s\" preset").Format(group);
1085 wxCFStringRef cfname(wxFileNameFromPath(group));
1086 const auto &[data,
_] =
MakeBlob(cfname,
true);
1091 if (
const auto length = CFDataGetLength(data.get())) {
1108 kAudioFormatLinearPCM,
1111 (kAudioFormatFlagsNativeFloatPacked |
1112 kAudioFormatFlagIsNonInterleaved),
1132 AudioUnitScope
scope;
1133 const char *
const msg;
1135 { 1, kAudioUnitScope_Global,
"global" },
1136 {
mAudioIns, kAudioUnitScope_Input,
"input" },
1137 {
mAudioOuts, kAudioUnitScope_Output,
"output" },
1139 for (
const auto &[nChannels,
scope, msg] : infos) {
1142 wxLogError(
"%ls Didn't accept sample rate on %s\n",
1147 if (
scope != kAudioUnitScope_Global) {
1148 streamFormat.mChannelsPerFrame = nChannels;
1150 streamFormat,
scope)) {
1151 wxLogError(
"%ls didn't accept stream format on %s\n",
1160 if (AudioUnitInitialize(
mUnit.get())) {
1161 wxLogError(
"Couldn't initialize audio unit\n");
1172 CF_ptr<CFPropertyListRef> content;
1174 kAudioUnitProperty_ClassInfo, content))
1179 kAudioUnitProperty_ClassInfo, content))
1183 Notify(dstUnit, kAUParameterListener_AnyParameter);
1191 wxFFile f(path, wxT(
"wb"));
1193 return XO(
"Couldn't open \"%s\"").Format(path);
1196 wxCFStringRef cfname(wxFileName(path).
GetName());
1198 const auto &[data, message] =
MakeBlob(cfname,
false);
1199 if (!data || !message.empty())
1203 auto length = CFDataGetLength(data.get());
1204 if (f.Write(CFDataGetBytePtr(data.get()), length) != length || f.Error())
1205 return XO(
"Failed to write XML preset to \"%s\"").Format(path);
1214 CF_ptr<CFDataRef> data;
1220 message =
XO(
"Failed to set preset name");
1223 else if (CF_ptr<CFPropertyListRef> content;
1225 message =
XO(
"Failed to retrieve preset content");
1228 else if (data.reset(CFPropertyListCreateData(kCFAllocatorDefault,
1230 (binary ?
PRESET_FORMAT : kCFPropertyListXMLFormat_v1_0), 0,
1234 message =
XO(
"Failed to convert property list to XML data");
1237 else if (
auto length = CFDataGetLength(data.get()); length == 0)
1239 message =
XO(
"XML data is empty after conversion");
1241 return { move(data), message };
1247 wxFFile f(path, wxT(
"r"));
1249 return XO(
"Couldn't open \"%s\"").Format(path);
1252 size_t len = f.Length();
1253 wxMemoryBuffer buf(len);
1254 if (f.Read(buf.GetData(), len) != len || f.Error())
1255 return XO(
"Unable to read the preset from \"%s\"").Format(path);
1262 Notify(
mUnit.get(), kAUParameterListener_AnyParameter);
1270 AudioUnitParameter aup = {};
1271 aup.mAudioUnit = unit;
1272 aup.mParameterID = parm;
1273 aup.mScope = kAudioUnitScope_Global;
1275 AUParameterListenerNotify(NULL, NULL, &aup);
1279 const AudioTimeStamp *inTimeStamp,
1282 AudioBufferList *ioData)
1287 for (; i <
size; ++i)
1288 ioData->mBuffers[i].mData =
mInputList[i].mData;
1291 for (; i < ioData->mNumberBuffers; ++i)
1292 ioData->mBuffers[i].mData =
nullptr;
1298 AudioUnitRenderActionFlags *inActionFlags,
1299 const AudioTimeStamp *inTimeStamp,
1302 AudioBufferList *ioData)
1305 inTimeStamp, inBusNumber, inNumFrames, ioData);
1309 AudioUnitParameterValue inParameterValue)
1312 if (inEvent->mEventType == kAudioUnitEvent_PropertyChange)
1315 if (inEvent->mArgument.mProperty.mPropertyID == kAudioUnitProperty_Latency)
1329 AudioUnitSetParameter(
mUnit.get(),
1330 inEvent->mArgument.mParameter.mParameterID,
1331 kAudioUnitScope_Global, 0, inParameterValue, 0);
1336 for (
size_t i = 0, cnt =
mSlaves.size(); i < cnt; i++)
1338 mSlaves[i]->EventListener(inEvent, inParameterValue);
1346 const AudioUnitEvent *inEvent,
1347 UInt64 inEventHostTime,
1348 AudioUnitParameterValue inParameterValue)
1373 bool haven2m =
false;
1374 bool haven2s =
false;
1375 bool havem2n =
false;
1376 bool haves2n =
false;
1377 bool havem2m =
false;
1378 bool haves2s =
false;
1379 bool havem2s =
false;
1380 bool haves2m =
false;
1386 for (
auto &ci : info) {
1387 int ic = ci.inChannels;
1388 int oc = ci.outChannels;
1390 if (ic < 0 && oc >= 0)
1392 else if (ic >= 0 && oc < 0)
1394 else if (ic < 0 && oc < 0) {
1399 if (ic == 2 && oc == 2)
1401 else if (ic == 1 && oc == 1)
1403 else if (ic == 1 && oc == 2)
1405 else if (ic == 2 && oc == 1)
1407 else if (ic == 0 && oc == 2)
1409 else if (ic == 0 && oc == 1)
1411 else if (ic == 1 && oc == 0)
1413 else if (ic == 2 && oc == 0)
1455 UInt32 value = (bypass ? 1 : 0);
1456 return !
SetProperty(kAudioUnitProperty_BypassEffect, value);
Declare abstract class AudacityException, some often-used subclasses, and GuardedCall.
@ Internal
Indicates internal failure from Audacity.
int AudacityMessageBox(const TranslatableString &message, const TranslatableString &caption, long style, wxWindow *parent, int x, int y)
constexpr auto OptionsKey
constexpr auto UseLatencyKey
#define AUDIOUNITEFFECTS_FAMILY
static const auto BasicValue
static const auto FullValue
static TransactionScope::Factory::Scope scope
const TranslatableString name
enum ChannelName * ChannelNames
wxString PluginPath
type alias for identifying a Plugin supplied by a module, each module defining its own interpretation...
std::vector< RegistryPath > RegistryPaths
std::unique_ptr< T, Destroyer< T > > Destroy_ptr
a convenience for using Destroyer
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)
for(int ii=0, nn=names.size();ii< nn;++ii)
static Settings & settings()
An Effect class that handles a wide range of effects. ??Mac only??
bool CopyParameters(AudioUnit srcUnit, AudioUnit dstUnit)
unsigned GetAudioInCount() const override
How many input buffers to allocate at once.
sampleCount GetLatency() override
bool HasOptions() override
TranslatableString SaveBlobToConfig(const RegistryPath &group, const wxString &path, const void *blob, size_t len, bool allowEmpty=true) const
bool RealtimeProcessStart(EffectSettings &settings) override
static OSStatus RenderCallback(void *inRefCon, AudioUnitRenderActionFlags *inActionFlags, const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumFrames, AudioBufferList *ioData)
TranslatableString InterpretBlob(const wxString &group, const wxMemoryBuffer &buf) const
Interpret the dump made before by MakeBlob.
bool SaveUserPreset(const RegistryPath &name, const EffectSettings &settings) const override
Save settings in the configuration file as a user-named preset.
bool IsDefault() const override
Whether the effect sorts "above the line" in the menus.
AudioUnitEffect(const PluginPath &path, const wxString &name, AudioComponent component, AudioUnitEffect *master=NULL)
int GetMidiOutCount() const override
Function that has not yet found a use.
AudioTimeStamp mTimeStamp
bool SaveSettings(const EffectSettings &settings, CommandParameters &parms) const override
Store settings as keys and values.
bool BypassEffect(bool bypass)
size_t GetBlockSize() const override
PluginPath GetPath() const override
bool RealtimeSuspend() override
RegistryPaths GetFactoryPresets() const override
Report names of factory presets.
EffectType GetType() const override
Type determines how it behaves.
OSStatus Render(AudioUnitRenderActionFlags *inActionFlags, const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumFrames, AudioBufferList *ioData)
void ShowOptions() override
TranslatableString GetDescription() const override
bool InitializeInstance()
AudioUnitEffect *const mMaster
bool SupportsRealtime() const override
Whether the effect supports realtime previewing (while audio is playing).
void ImportPresets(EffectSettings &settings) override
unsigned GetAudioOutCount() const override
How many output buffers to allocate at once.
bool ProcessFinalize() override
bool ProcessInitialize(EffectSettings &settings, sampleCount totalLen, ChannelNames chanMap) override
size_t RealtimeProcess(int group, EffectSettings &settings, const float *const *inbuf, float *const *outbuf, size_t numSamples) override
int GetMidiInCount() const override
Function that has not yet found a use.
bool CanExportPresets() override
std::unique_ptr< EffectUIValidator > PopulateUI(ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access) override
Adds controls to a panel that is given as the parent window of S
virtual ~AudioUnitEffect()
bool LoadPreset(const RegistryPath &group, EffectSettings &settings) const
bool ValidateUI(EffectSettings &) override
std::shared_ptr< EffectInstance > MakeInstance() const override
Make an object maintaining short-term state of an Effect.
TranslatableString Export(const wxString &path) const
bool SetRateAndChannels()
bool RealtimeAddProcessor(EffectSettings &settings, unsigned numChannels, float sampleRate) override
PackedArray::Ptr< AudioBufferList > mOutputList
std::pair< CF_ptr< CFDataRef >, TranslatableString > MakeBlob(const wxCFStringRef &cfname, bool binary) const
Obtain dump of the setting state of an AudioUnit instance.
EffectFamilySymbol GetFamily() const override
Report identifier and user-visible name of the effect protocol.
bool RealtimeFinalize(EffectSettings &settings) noexcept override
bool RealtimeProcessEnd(EffectSettings &settings) noexcept override
AudioUnitEffectArray mSlaves
bool LoadFactoryPreset(int id, EffectSettings &settings) const override
Change settings to the preset whose name is GetFactoryPresets()[id]
wxWeakRef< wxDialog > mDialog
bool SavePreset(const RegistryPath &group) const
TranslatableString Import(const wxString &path)
bool LoadSettings(const CommandParameters &parms, EffectSettings &settings) const override
Restore settings from keys and values.
PackedArray::Ptr< AudioBufferList > mInputList
bool RealtimeResume() noexcept override
void Notify(AudioUnit unit, AudioUnitParameterID parm) const
bool IsGraphicalUI() override
bool SupportsAutomation() const override
Whether the effect has any automatable controls.
bool LoadUserPreset(const RegistryPath &name, EffectSettings &settings) const override
Change settings to a user-named preset.
wxString GetVersion() const override
void SetSampleRate(double rate) override
void ExportPresets(const EffectSettings &settings) const override
std::shared_ptr< EffectInstance > DoMakeInstance()
VendorSymbol GetVendor() const override
static void EventListenerCallback(void *inCallbackRefCon, void *inObject, const AudioUnitEvent *inEvent, UInt64 inEventHostTime, AudioUnitParameterValue inParameterValue)
bool RealtimeInitialize(EffectSettings &settings) override
AudioUnitCleanup< AUEventListenerRef, AUListenerDispose > mEventListenerRef
size_t SetBlockSize(size_t maxBlockSize) override
size_t ProcessBlock(EffectSettings &settings, const float *const *inBlock, float *const *outBlock, size_t blockLen) override
Called for destructive effect computation.
int ShowClientInterface(wxWindow &parent, wxDialog &dialog, bool forceModal) override
ComponentInterfaceSymbol GetSymbol() const override
bool IsInteractive() const override
Whether the effect needs a dialog for entry of settings.
void EventListener(const AudioUnitEvent *inEvent, AudioUnitParameterValue inParameterValue)
AudioUnitCleanup< AudioUnit, AudioUnitUninitialize > mInitialization
CommandParameters, derived from wxFileConfig, is essentially doing the same things as the SettingsVis...
bool SetParameters(const wxString &parms)
TranslatableString GetName() const
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Performs effect computation.
AudioUnitParameterInfo info
bool Get(AudioUnit mUnit, AudioUnitParameterID parmID)
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Holds a msgid for the translation catalog; may also bind format arguments.
Positions or offsets within audio files need a wide type.
OSStatus GetFixedSizeProperty(AudioUnit unit, AudioUnitPropertyID inID, T &property, AudioUnitScope inScope=kAudioUnitScope_Global, AudioUnitElement inElement=0)
OSStatus SetProperty(AudioUnit unit, AudioUnitPropertyID inID, const T &property, AudioUnitScope inScope=kAudioUnitScope_Global, AudioUnitElement inElement=0)
size_t Count(const Ptr< Type, BaseDeleter > &p)
Find out how many elements were allocated with a Ptr.
bool SetConfig(const EffectDefinitionInterface &ident, ConfigurationType type, const RegistryPath &group, const RegistryPath &key, const Value &value)
bool RemoveConfig(const EffectDefinitionInterface &ident, PluginSettings::ConfigurationType type, const RegistryPath &group, const RegistryPath &key)
bool GetConfig(const EffectDefinitionInterface &ident, ConfigurationType type, const RegistryPath &group, const RegistryPath &key, Value &var, const Value &defval)
Common base class for AudioUnitEffect and its Instance.
OSStatus GetFixedSizeProperty(AudioUnitPropertyID inID, T &property, AudioUnitScope inScope=kAudioUnitScope_Global, AudioUnitElement inElement=0) const
OSStatus GetVariableSizeProperty(AudioUnitPropertyID inID, PackedArray::Ptr< T > &pObject, AudioUnitScope inScope=kAudioUnitScope_Global, AudioUnitElement inElement=0) const
AudioUnitCleanup< AudioUnit, AudioComponentInstanceDispose > mUnit
OSStatus SetProperty(AudioUnitPropertyID inID, const T &property, AudioUnitScope inScope=kAudioUnitScope_Global, AudioUnitElement inElement=0) const
const AudioComponent mComponent
Externalized state of a plug-in.
Smart pointer type that deallocates with Deleter.