• 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: audio kext plugin
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: audio kext plugin


  • Subject: Re: audio kext plugin
  • From: Jeff Moore <email@hidden>
  • Date: Mon, 4 Nov 2002 18:21:50 -0800

On Monday, November 4, 2002, at 04:45 PM, Matt Gonzalez wrote:

Well, since the topic came up...

Our driver uses just such a plugin. Overall, it works fine, on both 10.1 and 10.2.

There is however, one issue - AudioDriverPlugInClose is never called, on either 10.1 or
10.2. Everything else works swimmingly.

The HAL itself doesn't explicitly tear down when a process exits. If you have something you need to do, you could always install an atexit() handler. The times when your close routine is going to be called is basically when AudioHardwareUnload() gets called.

Also - do I need to provide my own synchronization inside the plugin, or is it already
thread-safe?

Basically what's going on is that all the property related API calls are being filtered through your plug-in. So everything is executing on the thread in which the HAL API call was made. The HAL takes no special precautions, so it is up to you to protect yourself from any sort of re-entrancy issues that may come up.

Thanks!

Matt


Jeff Moore wrote:

A few fun facts about the plug-ins defined in
<CoreAudio/AudioDriverPlugIn.h>:

- The API is there to allow drivers to point the HAL at a bundle that
provides the implementation of properties over and above those
documented in <CoreAudio/AudioHardware.h> through the HAL's API.
- Only the driver for a device can specify the bundle to use.
- The path to the bundle is specified in the IO registry entries for an
IOAudioDevice or IOAudioEngine in kIOAudioEngineCoreAudioPlugInKey as a
relative path from /System/Library/Extensions.
- The plug-ins are raw CFBundles that export the entry points listed in
the header, rather than being CFPlugIns or Components.
- There is no documentation save what is in the header and the brief
mention in the "Writing Audio Drivers" pdf.
- There is no sample code.
- There were bugs in the HAL that prevented these plug-ins from working
too well prior to 10.2.
- I'm happy to answer questions.

On Monday, November 4, 2002, at 12:18 PM, Mark Ketilson wrote:

I am a new apple developer and I am beginning to write a USB audio
device plugin to control some of the extra device features. I've
looked at AudioDriverPlugIn.h and at AudioHardware.h but I'm having
trouble getting a good start. If someone could direct me to an
example or some documentation that would be super helpful. I've
looked briefly at the CoreFoundation documentation on plugins but they
seem to apply more to applications... are things different for kext
plugin's? Also, would the midi plugin examples be a good template?

--

Jeff Moore
Core Audio
Apple
_______________________________________________
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.
_______________________________________________
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.



--

Jeff Moore
Core Audio
Apple
_______________________________________________
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: audio kext plugin (From: Matt Gonzalez <email@hidden>)

  • Prev by Date: Re: audio kext plugin
  • Next by Date: Re: slightly OT - Background view in audiounits
  • Previous by thread: Re: audio kext plugin
  • Next by thread: slightly OT - Background view in audiounits
  • Index(es):
    • Date
    • Thread