Audacity 3.2.0
|
#include <AudioUnitEditor.h>
Classes | |
struct | CreateToken |
Public Member Functions | |
AudioUnitEditor (CreateToken, const EffectUIServices &effect, EffectSettingsAccess &access, AudioUnitInstance &instance, AUControl *pControl, bool isGraphical) | |
~AudioUnitEditor () override | |
bool | UpdateUI () override |
Update appearance of the panel for changes in settings. More... | |
bool | ValidateUI () override |
Get settings data from the panel; may make error dialogs and return false. More... | |
bool | IsGraphicalUI () override |
Public Member Functions inherited from EffectEditor | |
EffectEditor (const EffectUIServices &services, EffectSettingsAccess &access) | |
virtual | ~EffectEditor () |
virtual bool | ValidateUI ()=0 |
Get settings data from the panel; may make error dialogs and return false. More... | |
virtual bool | UpdateUI () |
Update appearance of the panel for changes in settings. More... | |
virtual bool | IsGraphicalUI () |
virtual void | Disconnect () |
On the first call only, may disconnect from further event handling. More... | |
virtual void | OnClose () |
Public Member Functions inherited from Observer::Publisher< EffectSettingChanged > | |
Publisher (ExceptionPolicy *pPolicy=nullptr, Alloc a={}) | |
Constructor supporting type-erased custom allocation/deletion. More... | |
Publisher (Publisher &&)=default | |
Publisher & | operator= (Publisher &&)=default |
Subscription | Subscribe (Callback callback) |
Connect a callback to the Publisher; later-connected are called earlier. More... | |
Subscription | Subscribe (Object &obj, Return(Object::*callback)(Args...)) |
Overload of Subscribe takes an object and pointer-to-member-function. More... | |
Static Public Member Functions | |
static std::unique_ptr< EffectEditor > | Create (const EffectUIServices &effect, ShuttleGui &S, const wxString &uiType, EffectInstance &instance, EffectSettingsAccess &access) |
Static Public Member Functions inherited from EffectEditor | |
static bool | EnableApply (wxWindow *parent, bool enable=true) |
Enable or disable the Apply button of the dialog that contains parent. More... | |
static bool | EnablePreview (wxWindow *parent, bool enable=true) |
Private Types | |
using | EventListenerPtr = AudioUnitCleanup< AUEventListenerRef, AUListenerDispose > |
Private Member Functions | |
void | EventListener (const AudioUnitEvent *inEvent, AudioUnitParameterValue inParameterValue) |
void | OnIdle (wxIdleEvent &evt) |
bool | FetchSettingsFromInstance (EffectSettings &settings) |
bool | StoreSettingsToInstance (const EffectSettings &settings) |
void | Notify () |
EventListenerPtr | MakeListener () |
Static Private Member Functions | |
static void | EventListenerCallback (void *inCallbackRefCon, void *inObject, const AudioUnitEvent *inEvent, UInt64 inEventHostTime, AudioUnitParameterValue inParameterValue) |
Private Attributes | |
AudioUnitInstance & | mInstance |
const EventListenerPtr | mEventListenerRef |
AUControl *const | mpControl {} |
std::vector< std::pair< AudioUnitParameterID, AudioUnitParameterValue > > | mToUpdate |
const bool | mIsGraphical |
std::unordered_map< AudioUnitParameterID, AudioUnitParameterValue > | mParameterValues |
Additional Inherited Members | |
Public Types inherited from Observer::Publisher< EffectSettingChanged > | |
using | message_type = EffectSettingChanged |
using | CallbackReturn = std::conditional_t< true, void, bool > |
using | Callback = std::function< CallbackReturn(const EffectSettingChanged &) > |
Type of functions that can be connected to the Publisher. More... | |
Static Public Attributes inherited from EffectEditor | |
static constexpr int | kPlayID = 20102 |
Static Public Attributes inherited from Observer::Publisher< EffectSettingChanged > | |
static constexpr bool | notifies_all |
Protected Member Functions inherited from EffectEditor | |
template<typename EventTag , typename Class , typename Event > | |
void | BindTo (wxEvtHandler &src, const EventTag &eventType, void(Class::*pmf)(Event &)) |
Protected Member Functions inherited from Observer::Publisher< EffectSettingChanged > | |
CallbackReturn | Publish (const EffectSettingChanged &message) |
Send a message to connected callbacks. More... | |
Protected Attributes inherited from EffectEditor | |
const EffectUIServices & | mUIServices |
EffectSettingsAccess & | mAccess |
bool | mUIClosed { false } |
Definition at line 29 of file AudioUnitEditor.h.
|
private |
Definition at line 59 of file AudioUnitEditor.h.
AudioUnitEditor::AudioUnitEditor | ( | CreateToken | , |
const EffectUIServices & | effect, | ||
EffectSettingsAccess & | access, | ||
AudioUnitInstance & | instance, | ||
AUControl * | pControl, | ||
bool | isGraphical | ||
) |
Definition at line 24 of file AudioUnitEditor.cpp.
References EffectSettingsAccess::Get(), EffectEditor::mAccess, OnIdle(), and StoreSettingsToInstance().
|
override |
Definition at line 41 of file AudioUnitEditor.cpp.
References AUControl::Close(), and mpControl.
|
static |
Definition at line 141 of file AudioUnitEditor.cpp.
References BasicValue, FullValue, S, and safenew.
Referenced by AudioUnitEffect::PopulateUI().
|
private |
Definition at line 209 of file AudioUnitEditor.cpp.
References AudioUnitInstance::EventListener(), EffectEditor::mAccess, AudioUnitInstance::MakeMessage(), mInstance, mParameterValues, mToUpdate, Observer::Publisher< EffectSettingChanged >::Publish(), EffectSettingsAccess::Set(), and ValidateUI().
Referenced by EventListenerCallback().
|
staticprivate |
Definition at line 243 of file AudioUnitEditor.cpp.
References EventListener().
Referenced by MakeListener().
|
private |
Definition at line 129 of file AudioUnitEditor.cpp.
References AudioUnitWrapper::FetchSettings(), AudioUnitWrapper::GetSettings(), mInstance, and settings().
Referenced by ValidateUI().
|
overridevirtual |
Default implementation returns false
Reimplemented from EffectEditor.
Definition at line 124 of file AudioUnitEditor.cpp.
References mIsGraphical.
|
private |
Definition at line 47 of file AudioUnitEditor.cpp.
References EventListenerCallback().
|
private |
Definition at line 199 of file AudioUnitEditor.cpp.
References AudioUnitWrapper::GetAudioUnit(), and mInstance.
Referenced by UpdateUI().
|
private |
Definition at line 251 of file AudioUnitEditor.cpp.
References AudioUnitWrapper::GetSettings(), EffectEditor::mAccess, EffectSettingsAccess::ModifySettings(), mToUpdate, and settings().
Referenced by AudioUnitEditor().
|
private |
Definition at line 135 of file AudioUnitEditor.cpp.
References AudioUnitWrapper::GetSettings(), mInstance, PerTrackEffect::Instance::mProcessor, settings(), and AudioUnitWrapper::StoreSettings().
Referenced by AudioUnitEditor(), and UpdateUI().
|
overridevirtual |
Update appearance of the panel for changes in settings.
Default implementation does nothing, returns true
Reimplemented from EffectEditor.
Definition at line 93 of file AudioUnitEditor.cpp.
References AUControl::ForceRedraw(), EffectSettingsAccess::Get(), EffectEditor::mAccess, mpControl, Notify(), and StoreSettingsToInstance().
|
overridevirtual |
Get settings data from the panel; may make error dialogs and return false.
Implements EffectEditor.
Definition at line 109 of file AudioUnitEditor.cpp.
References EffectTypeGenerate, FetchSettingsFromInstance(), EffectEditor::mAccess, EffectSettingsAccess::ModifySettings(), and settings().
Referenced by EventListener().
|
private |
Definition at line 67 of file AudioUnitEditor.h.
|
private |
Definition at line 66 of file AudioUnitEditor.h.
Referenced by EventListener(), FetchSettingsFromInstance(), Notify(), and StoreSettingsToInstance().
|
private |
Definition at line 71 of file AudioUnitEditor.h.
Referenced by IsGraphicalUI().
|
private |
Definition at line 75 of file AudioUnitEditor.h.
Referenced by EventListener().
|
private |
Definition at line 68 of file AudioUnitEditor.h.
Referenced by UpdateUI(), and ~AudioUnitEditor().
|
private |
Definition at line 70 of file AudioUnitEditor.h.
Referenced by EventListener(), and OnIdle().