• 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: Event for plug / unplug headphones?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Event for plug / unplug headphones?


  • Subject: Re: Event for plug / unplug headphones?
  • From: Jeff Moore <email@hidden>
  • Date: Fri, 15 Sep 2006 16:13:35 -0700


On Sep 15, 2006, at 4:08 PM, David M. Cotter wrote:

That implies that the device in question doesn't support a jack control, which isn't at all unusual.
even for the built in headphone jack on an aluminum PowerBook G4?

Yup. Even for that one.

and if that's the case, shouldn't the "add property listener" function return an error, like "i can't do this, sorry"?

Nope. Properties can come and go over the life time of a device.

if I"m trying to get the build in headphone jack, is "kAudioHardwarePropertyDefaultOutputDevice" the proper value?

Not necessarily. That just returns the device that the user has selected as the default. It may or may not be a built-in device.


On Sep 15, 2006, at 3:55 PM, David M. Cotter wrote:

i did this:

		UInt32				dataSize = sizeof(AudioDeviceID);

		i_outDeviceID = kAudioDeviceUnknown;

ERR (AudioHardwareGetProperty (kAudioHardwarePropertyDefaultOutputDevice, &dataSize, (void *)&i_outDeviceID));
ERR(AudioDeviceAddPropertyListener(
i_outDeviceID,
kAudioPropertyWildcardChannel,
false,
kAudioDevicePropertyJackIsConnected,
JackPlugged,
this));


and it returns no error, but my function is not called?

_______________________________________________ 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


--

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: 
 >Event for plug / unplug headphones? (From: "David M. Cotter" <email@hidden>)
 >Re: Event for plug / unplug headphones? (From: "David M. Cotter" <email@hidden>)
 >Re: Event for plug / unplug headphones? (From: Jeff Moore <email@hidden>)
 >Re: Event for plug / unplug headphones? (From: "David M. Cotter" <email@hidden>)

  • Prev by Date: Re: Event for plug / unplug headphones?
  • Next by Date: understanding AUNetSend
  • Previous by thread: Re: Event for plug / unplug headphones?
  • Next by thread: understanding AUNetSend
  • Index(es):
    • Date
    • Thread