• 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
Re: Confusing problem with GetComponentInfo() [important!]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Confusing problem with GetComponentInfo() [important!]


  • Subject: Re: Confusing problem with GetComponentInfo() [important!]
  • From: Bill Stewart <email@hidden>
  • Date: Wed, 20 Nov 2002 15:18:48 -0800

YES INDEED - this is totally unneeded and will have undesirable consequences.

It should only ever be used outside of an AU (or one *perhaps* under development) and definately not in a shipping unit that is going to be installed on a system (as the Component Manager itself does that for you when your audio unit is in a directory that it knows about - which it should be)

Bill

On Wednesday, November 20, 2002, at 11:23 AM, Chris Reed wrote:

OK, I discovered some interesting things yesterday related to the problems I am seeing with GetComponentInfo() calls for particular Audio Units (see the previous messages in this thread for more background).

I added code to dump out all of the available music devices every time my -updateSelectedSynthName method is invoked. This happens once at startup and then every time the user selects a new synth.

Say AirySynth is selected. At startup the list dumped to stdout is exactly what you would expect. But if the user selected AirySynth again, there will be an extra component at the head of the dumped list for AirySynth--except it returns empty handles for the name, info, and icon.

Even more interesting is that *every* time AirySynth is selected, an additional invalid AirySynth component gets added to the head of the component list.

Fortunately, Airy provided the code to this component, so I was able to track down at least one cause of this problem. People, please do not put additional COMPONENT_REGISTER() macros in your AudioUnit source. These are not necessary, and in fact cause your component to be registered again every time it is loaded. Components are automatically registered by the ComponentManager by looking at the component info resource. (The same thing applies to your custom > views.)

Removing the COMPONENT_REGISTER() line from AirySynth.cpp does keep the component from being registered every time it is selected by the user, but for some reason an additional empty AirySynth still gets added to the head of the component list--but only once now. I'll keep debugging and let everyone know what I find.

In the meantime, please everyone go remove the COMPONENT_REGISTER() lines from their AudioUnit source (if you have them). Also, I think it would help to have the AudioUnit documentation (and header files, please) specifically state the appropriate uses for COMPONENT_REGISTER and COMPONENT_ENTRY.

Cheers
-chris
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.


-- mailto:email@hidden
tel: +1 408 974 4056

________________________________________________________________________ __
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________ __
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
References: 
 >Re: Confusing problem with GetComponentInfo() [important!] (From: Chris Reed <email@hidden>)

  • Prev by Date: Offline vs. realtime processing?
  • Next by Date: Re: latency - mac clock and the "jiggle"
  • Previous by thread: Re: Confusing problem with GetComponentInfo() [important!]
  • Next by thread: Re: OT: loud macs [was: It had to be tried...]
  • Index(es):
    • Date
    • Thread