• 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: Chris Reed <email@hidden>
  • Date: Wed, 20 Nov 2002 13:23:09 -0600

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.

  • Follow-Ups:
    • Re: Confusing problem with GetComponentInfo() [important!]
      • From: Bill Stewart <email@hidden>
    • Re: Confusing problem with GetComponentInfo() [important!]
      • From: Airy André <email@hidden>
  • Prev by Date: Re: mLan and MacOS X
  • Next by Date: Re: mLan and MacOS X
  • Previous by thread: Re: Property Listener for parameter values?
  • Next by thread: Re: Confusing problem with GetComponentInfo() [important!]
  • Index(es):
    • Date
    • Thread