1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

AUv3 Client: Switch static data member for proper singleton

This commit is contained in:
reuk 2022-07-20 12:55:00 +01:00
parent dedfac8dd8
commit 064fb6fa53
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11

View file

@ -111,10 +111,10 @@ public:
AudioComponentInstantiationOptions options,
NSError** error)
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wobjc-method-access")
: au ([audioUnitObjCClass.createInstance() initWithComponentDescription: descr
options: options
error: error
juceClass: this])
: au ([getClass().createInstance() initWithComponentDescription: descr
options: options
error: error
juceClass: this])
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
{}
@ -342,15 +342,16 @@ private:
static JuceAudioUnitv3Base* create (AUAudioUnit*, AudioComponentDescription, AudioComponentInstantiationOptions, NSError**);
//==============================================================================
static Class audioUnitObjCClass;
static Class& getClass()
{
static Class result;
return result;
}
protected:
AUAudioUnit* au;
};
//==============================================================================
JuceAudioUnitv3Base::Class JuceAudioUnitv3Base::audioUnitObjCClass;
//==============================================================================
//=========================== The actual AudioUnit =============================
//==============================================================================