• 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: User-land CoreAudio driver and Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: User-land CoreAudio driver and Leopard


  • Subject: Re: User-land CoreAudio driver and Leopard
  • From: Jeff Moore <email@hidden>
  • Date: Thu, 15 Nov 2007 14:21:41 -0800


On Nov 15, 2007, at 12:53 PM, Stéphane Letz wrote:

So I implemented a start/stop notification mechanism based on CFNotificationCenterPostNotification/CFNotificationCenterAddObserver (CFNotificationCenter.h)
so that the jack server notify the JackRouter plugin.


- in the JackRouter I guess the plugin constructor is called once when the application is loaded

This is correct. The only time the HAL loads user-land plug-ins is when the HAL is initialized.



- the created plugin object is kept in a static global variable so that:

HP_Device does this through it's sInstance member variable.


- if a "stop" notification is received from the jacks server, the instance can be used to call the "Teardown" method (so that the plugin is removed for the application)

- if a "start" notification is received later on from the jacks server, the global instance can be used to call the "Initialize" method (so that the plugin appear again for the application)

This is going to fail if the Jack server crashes and never sends the stop notification.



This work more or less, but:

- it seems the insteraction with "coreaudiod" does not always work (thus this incorrect displayed device list remains..)

- and  sometimes it crash in the  "Teardown"  or "Initialize" method

Is there a better way for the start/stop notification called in the pluging to remove/restore the plugin?


You don't want to remove/restore the plug-in, you simply want to make your device (and other objects) go away. Typically, this just involves calling AudioObjectsPublishedAndDied() for the objects that are going away. Then when they come back, you get new object IDs with AudioObjectCreate() and call AudioObjectsPublishedAndDied() to make the objects visible.


--

Jeff Moore
Core Audio
Apple


_______________________________________________ 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
References: 
 >Re: User-land CoreAudio driver and Leopard (From: Stéphane Letz <email@hidden>)

  • Prev by Date: Re: User-land CoreAudio driver and Leopard
  • Next by Date: Rép : User-land CoreAudio driver and Leopard
  • Previous by thread: Re: User-land CoreAudio driver and Leopard
  • Next by thread: Re: User-land CoreAudio driver and Leopard
  • Index(es):
    • Date
    • Thread