• 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: AudioObjectAddPropertyListener vs. AudioDevicePropertyListenerProc
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AudioObjectAddPropertyListener vs. AudioDevicePropertyListenerProc


  • Subject: Re: AudioObjectAddPropertyListener vs. AudioDevicePropertyListenerProc
  • From: Ethan Funk <email@hidden>
  • Date: Thu, 19 Nov 2009 19:33:00 -0700

I thought 0 was the same as both those constants, or maybe I'm confusing it with the audio unit constants. I should always use the header defined constants...
Code works fine now.


Thanks,
Ethan...


On Nov 19, 2009, at 7:01 PM, Jeff Moore wrote:

Your scope value is wrong. It should be kAudioObjectPropertyScopeGlobal.

From <CoreAudio/AudioHardware.h>:
@discussion The AudioSystemObject has one scope, kAudioObjectPropertyScopeGlobal, and only a
master element.



On Nov 19, 2009, at 5:51 PM, Ethan Funk wrote:

I am replacing "AudioDevicePropertyListenerProc" in my code with "AudioObjectAddPropertyListener"

The goal is to get notified when the sound hardware list changes (audio device is plugged/unplugged). The code below appears to work fine - no error after calling AudioObjectAddPropertyListener, however, my audioDevListChangedProc is not getting called when I plug/unplug a USB audio interface. Note that audioDevListChangedProc is a static c++ procedure. Almost the same code works fine with AudioDevicePropertyListenerProc, again with a static declared appropriate callback. What am I missing?

AudioObjectPropertyAddress prop;
prop.mSelector = kAudioHardwarePropertyDevices;
prop.mScope = 0;
prop.mElement = 0;
err = AudioObjectAddPropertyListener(kAudioObjectSystemObject, &prop, &audioDevListChangedProc, this);


Thanks,


--

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

_______________________________________________ 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: 
 >AudioObjectAddPropertyListener vs. AudioDevicePropertyListenerProc (From: Ethan Funk <email@hidden>)
 >Re: AudioObjectAddPropertyListener vs. AudioDevicePropertyListenerProc (From: Jeff Moore <email@hidden>)

  • Prev by Date: Re: Re: Memory Leak on init graph
  • Next by Date: Re: Streaming Audio - AudioFileStream, CFReadStreamRead and AudioQueue
  • Previous by thread: Re: AudioObjectAddPropertyListener vs. AudioDevicePropertyListenerProc
  • Next by thread: Choosing an AU base class
  • Index(es):
    • Date
    • Thread