mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
AUv3 Client: Notify host when updating current program
This commit is contained in:
parent
087cda7e1f
commit
334bd2a926
1 changed files with 29 additions and 4 deletions
|
|
@ -934,14 +934,39 @@ public:
|
|||
}
|
||||
#endif
|
||||
|
||||
struct ScopedKeyChange
|
||||
{
|
||||
ScopedKeyChange (AUAudioUnit* a, NSString* k)
|
||||
: au (a), key (k)
|
||||
{
|
||||
[au willChangeValueForKey: key];
|
||||
}
|
||||
|
||||
~ScopedKeyChange()
|
||||
{
|
||||
[au didChangeValueForKey: key];
|
||||
}
|
||||
|
||||
AUAudioUnit* au;
|
||||
NSString* key;
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
void audioProcessorChanged (AudioProcessor* processor, const ChangeDetails&) override
|
||||
void audioProcessorChanged (AudioProcessor* processor, const ChangeDetails& details) override
|
||||
{
|
||||
ignoreUnused (processor);
|
||||
|
||||
[au willChangeValueForKey: @"allParameterValues"];
|
||||
addPresets();
|
||||
[au didChangeValueForKey: @"allParameterValues"];
|
||||
if (! details.programChanged)
|
||||
return;
|
||||
|
||||
{
|
||||
ScopedKeyChange scope (au, @"allParameterValues");
|
||||
addPresets();
|
||||
}
|
||||
|
||||
{
|
||||
ScopedKeyChange scope (au, @"currentPreset");
|
||||
}
|
||||
}
|
||||
|
||||
void audioProcessorParameterChanged (AudioProcessor*, int idx, float newValue) override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue