Audacity 3.2.0
|
Represents a cached copy of the state stored in an AudioUnit, but can outlive the original AudioUnit. More...
#include <AudioUnitWrapper.h>
Public Types | |
using | StringSet = std::set< wxString > |
Shared set of strings to optimize memory usage by avoiding repeated allocations. More... | |
using | Pair = std::pair< const wxString &, AudioUnitParameterValue > |
using | Map = std::map< AudioUnitParameterID, std::optional< Pair > > |
Public Member Functions | |
AudioUnitEffectSettings ()=default | |
AudioUnitEffectSettings (Map map) | |
const wxString & | Intern (const wxString &name) |
void | ResetValues () |
Associate nullopt with all keys already present in the map. More... | |
Public Attributes | |
const std::shared_ptr< StringSet > | mSharedNames |
std::optional< SInt32 > | mPresetNumber |
Optionally store a preset. More... | |
Map | values |
Represents a cached copy of the state stored in an AudioUnit, but can outlive the original AudioUnit.
This structure handles the storage and management of settings and state information for AudioUnit effects. It provides mechanisms for sharing settings between different instances and managing preset configurations.
Definition at line 41 of file AudioUnitWrapper.h.
using AudioUnitEffectSettings::Map = std::map<AudioUnitParameterID, std::optional<Pair> > |
Definition at line 60 of file AudioUnitWrapper.h.
using AudioUnitEffectSettings::Pair = std::pair<const wxString &, AudioUnitParameterValue> |
Map from numerical parameter IDs (not always a small initial segment of the integers) to optional pairs of names and floating point values
Definition at line 59 of file AudioUnitWrapper.h.
using AudioUnitEffectSettings::StringSet = std::set<wxString> |
Shared set of strings to optimize memory usage by avoiding repeated allocations.
All instances of AudioUnitEffectSettings share this set to reduce memory overhead and ensure consistency. The effect object and all Settings objects coming from it share this set of strings. Note: The names associated with parameter IDs are not invariant metadata of an AudioUnit effect. For example, AUGraphicEQ changes names of slider parameters when you switch between 10 and 31 bands.
Definition at line 50 of file AudioUnitWrapper.h.
|
default |
|
inline |
Definition at line 64 of file AudioUnitWrapper.h.
|
inline |
Get a pointer to a durable copy of name
May allocate memory
Definition at line 68 of file AudioUnitWrapper.h.
References _, mSharedNames, and name.
|
inline |
std::optional<SInt32> AudioUnitEffectSettings::mPresetNumber |
Optionally store a preset.
Definition at line 55 of file AudioUnitWrapper.h.
const std::shared_ptr<StringSet> AudioUnitEffectSettings::mSharedNames |
Definition at line 51 of file AudioUnitWrapper.h.
Referenced by Intern().
Map AudioUnitEffectSettings::values |
Definition at line 61 of file AudioUnitWrapper.h.
Referenced by AudioUnitEffectBase::ChoosePresetKey(), AudioUnitWrapper::MoveSettingsContents(), and ResetValues().