mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-02 08:39:46 +02:00
Bug 2036 - Mac: Some AU plug-in effects can be enabled but fail to register
None of the effects listed in the bug expose any parameters.
This commit is contained in:
parent
d15308b7e7
commit
35fa6cf399
@ -1092,30 +1092,33 @@ bool AudioUnitEffect::SetHost(EffectHostInterface *host)
|
||||
|
||||
// And get them
|
||||
UInt32 cnt = dataSize / sizeof(AudioUnitParameterID);
|
||||
ArrayOf<AudioUnitParameterID> array {cnt};
|
||||
|
||||
result = AudioUnitGetProperty(mUnit,
|
||||
kAudioUnitProperty_ParameterList,
|
||||
kAudioUnitScope_Global,
|
||||
0,
|
||||
array.get(),
|
||||
&dataSize);
|
||||
if (result != noErr)
|
||||
if (cnt != 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
ArrayOf<AudioUnitParameterID> array {cnt};
|
||||
|
||||
// Register them as something we're interested in
|
||||
for (int i = 0; i < cnt; i++)
|
||||
{
|
||||
event.mArgument.mParameter.mParameterID = array[i];
|
||||
result = AUEventListenerAddEventType(mEventListenerRef,
|
||||
this,
|
||||
&event);
|
||||
result = AudioUnitGetProperty(mUnit,
|
||||
kAudioUnitProperty_ParameterList,
|
||||
kAudioUnitScope_Global,
|
||||
0,
|
||||
array.get(),
|
||||
&dataSize);
|
||||
if (result != noErr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Register them as something we're interested in
|
||||
for (int i = 0; i < cnt; i++)
|
||||
{
|
||||
event.mArgument.mParameter.mParameterID = array[i];
|
||||
result = AUEventListenerAddEventType(mEventListenerRef,
|
||||
this,
|
||||
&event);
|
||||
if (result != noErr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
event.mEventType = kAudioUnitEvent_PropertyChange;
|
||||
|
Loading…
x
Reference in New Issue
Block a user