Fragile code in AUBase.h (diff provided)
Fragile code in AUBase.h (diff provided)
- Subject: Fragile code in AUBase.h (diff provided)
- From: Brian Willoughby <email@hidden>
- Date: Thu, 11 Aug 2005 02:18:31 -0700
Hi folks,
You may want to apply the appended patch to
AUBase.h and recompile your AudioUnits.
For no good reason that I can imagine, the
AudioUnitParameterInfo flags field is being modified using ADD instead of OR. This means that if your code calls the affected routine(s) more than once, the
flags field will be scrambled to a nonsensical and unpredictable value. I am sure that someone could convincingly argue that it would be incredibly unlikely for one of these routines to be called more than once, but since there is no advantage to using ADD, why take any risk?
My Receipts say I have CoreAudio 1.3.5 installed, so this patch applies to the line numbers in that version of
AUBase.h
diff AUBase.h~ AUBase.h
522c522
< ioInfo.flags += kAudioUnitParameterFlag_HasCFNameString;
---
> ioInfo.flags |= kAudioUnitParameterFlag_HasCFNameString;
524c524
< ioInfo.flags += kAudioUnitParameterFlag_CFNameRelease;
---
> ioInfo.flags |= kAudioUnitParameterFlag_CFNameRelease;
531c531
< ioInfo.flags += kAudioUnitParameterFlag_HasClump;
---
> ioInfo.flags |= kAudioUnitParameterFlag_HasClump;
Brian Willoughby
Sound Consulting
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden