• 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: Device gone away notification?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Device gone away notification?


  • Subject: Re: Device gone away notification?
  • From: Doug Wyatt <email@hidden>
  • Date: Tue, 8 Sep 2009 11:43:41 -0700

Oddly enough, just the other day I was debugging something in this area and thought it was odd that the HALOutput unit (a.k.a. AUHAL) was dynamically choosing a new device if its current one went away. It would be worth writing a bug about this.

The notification will not arrive on a realtime thread, and even if it did, I think it would be okay for it to block, since at this time I don't think anyone really cares if audio glitches -- you're trying to stop.

Doug


On Sep 8, 2009, at 10:27 , Ethan Funk wrote:

I am using kAudioUnitSubType_HALOutput. I was expecting my I/O Proc would just stop getting called, which would be fine, but instead, the device seems to get re-directed to the system default device. I will have a look at some of the notifications mention and see which fits best. I assume the notifications will come in on a realtime thread, so I will need to make sure the handler does not block, correct?

Ethan...

On Sep 8, 2009, at 10:13 AM, Stephen Davis wrote:

If you are using kAudioUnitSubType_DefaultOutput, CoreAudio will track the default device for you which sounds like the behavior you're seeing. If you want to be tied to a particular device, you use kAudioUnitSubType_HALOutput and tell it which device to use.

Off-hand, I'm not sure what happens when the device goes away but, in the absence of any special handling by you, I suspect your I/O proc will just stop getting called which is also what happens when somebody else takes hog mode on the device you're using. I do not know if it will come back but it should be pretty easy for you to find out. As Brian said, you'll need to listen to notifications on that device to find out when it goes away.

hth,
stephen

_______________________________________________ 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: 
 >Device gone away notification? (From: Ethan Funk <email@hidden>)
 >Re: Device gone away notification? (From: Brian Willoughby <email@hidden>)
 >Re: Device gone away notification? (From: Stephen Davis <email@hidden>)
 >Re: Device gone away notification? (From: Ethan Funk <email@hidden>)

  • Prev by Date: Re: Can you reset CoreAudio without rebooting?
  • Next by Date: Re: Device gone away notification?
  • Previous by thread: Re: Device gone away notification?
  • Next by thread: Re: Device gone away notification?
  • Index(es):
    • Date
    • Thread