• 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: Stéphane Letz <email@hidden>
  • Date: Thu, 15 Nov 2007 21:53:39 +0100


On Nov 14, 2007, at 12:37 PM, Stéphane Letz wrote:

You need to make your device disappear from the device list in this
case using the standard methods available to you. If the device can't
be used, it should not be presented to the user. When the server gets
relaunched, then you can make your device re-appear on the system.

Actually I'm not even speaking of trying to update a device list for a given application *while* the applications is running! Let me explain in another way with teh following sequence of actions:

- start the jack  server:

- open AMS, or Sound Preferences (or HALLab)

- since our jack server is running, the JackRouter plug-in will see
that and thus appears as an available device for the application.

- select JackRouter as the default  input/output

- quits AMS:

So you have a happy functioning device at this point that has been set as the default device.

- stops jack server

At this point, the device ceases to be happy or functioning. Any currently running app should be told that the device has died and it should be removed from the device list.


- open AMS: AMS tries to "restore" JackRouter as the defaut input/
output,

As I said in one of the previous emails, coreaudiod is where the default device is tracked. AMS just reports what the server says.


but since the jack server does not run, the JackRouter plug-in
throw this kAudioHardwareIllegalOperationError and thus is not
available as a possible device

Ah. The problem here is that you are showing a non-functioning device in the first place. You should just not be presenting it to the system. It should not be in the device list, period.

- AMS does display the list correctly: the list is even completely
unsable (grayed)

Since this is the responsability of AMS to access the device list
and display correctly, what can be done?

No, it is your plug-in that is in the wrong here. AMS is just showing what you are telling it. Your plug-in is presenting a non-functioning device to the system. It should not be doing this.

--


OK.

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

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

- 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 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?

Thanks

Stephane Letz

_______________________________________________
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


  • Follow-Ups:
    • Re: User-land CoreAudio driver and Leopard
      • From: Jeff Moore <email@hidden>
  • Prev by Date: Re: my instrument doesn't show up in GarageBand
  • Next by Date: Re: 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