• 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: Implementing IOAudioDevice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Implementing IOAudioDevice


  • Subject: Re: Implementing IOAudioDevice
  • From: Mark Cookson <email@hidden>
  • Date: Tue, 17 Sep 2002 09:56:02 -0700

On Monday, September 16, 2002, at 11:16 PM, Dirk Musfeldt wrote:

I create my IOAudioEngine from the IOAudioDevice::initHardware() function
but don't release it immediately since I call some functions from the
IOAudioDevice subclass.

I try to release the IOAudioEngine from IOAudioDevice::stop() but the
reference is retained somewhere in the system software so that the
retainCount() is still 3 at this point.

I don't call audioEngine->retain() anywhere in the code.

If you are going to be using the IOAudioEngine later, you should call retain() on it. When you are done with it, call release() on it.

I would do the releasing in your free() method, not stop(), though I suppose it doesn't really matter. However, if you've never done a retain() on it, you shouldn't be doing a release() on it.

For debugging purposes, you can override retain() and release() in your Engine and know when you are being retained and released. If you put a break on those functions, you can trace back to know what functions are doing the retain and releases as well.

--
Mark Cookson
Engineering Droid
Apple Computer, Inc.
Core Audio CPU Software
6 Infinite Loop MS 306-2CW
Cupertino, CA 95014
_______________________________________________
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: 
 >Implementing IOAudioDevice (From: Dirk Musfeldt <email@hidden>)

  • Prev by Date: Re: When will CVS be sync'ed with Jaguar?
  • Next by Date: Re: More newbie AU questions (compiler stuff, indexed parameters...)
  • Previous by thread: Implementing IOAudioDevice
  • Next by thread: When will CVS be sync'ed with Jaguar?
  • Index(es):
    • Date
    • Thread