• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Fragile code in AUBase.h (diff provided)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Fragile code in AUBase.h (diff provided)
      • From: William Stewart <email@hidden>
  • Prev by Date: Re: Audio Running faster then Video
  • Next by Date: CocoaUI & factory class design pattern in ObjC
  • Previous by thread: Re: Still having problems with ac3 in DVD Player
  • Next by thread: Re: Fragile code in AUBase.h (diff provided)
  • Index(es):
    • Date
    • Thread