• 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: Recommended way to handle suspend/resume on notebooks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Recommended way to handle suspend/resume on notebooks


  • Subject: Re: Recommended way to handle suspend/resume on notebooks
  • From: Jeff Moore <email@hidden>
  • Date: Wed, 14 Oct 2009 12:16:24 -0700


On Oct 14, 2009, at 12:10 PM, Stéphane Letz wrote:


You are calling AudioHardwareSetProperty incorrectly. The obvious problem is that you are passing NULL for the inPropertyData when you should be passing the address of a CFRunLoopRef that is set to NULL. The other problem is that AudioHardwareSetProperty is deprecated and you should use AudioObjectSetPropertyData. The code would look like this:

CFRunLoopRef theRunLoop = NULL;
AudioObjectPropertyAddress theAddress =
{ kAudioHardwarePropertyRunLoop, kAudioObjectPropertyScopeGlobal,
kAudioObjectPropertyElementMaster };
OSStatus theError = AudioObjectSetPropertyData
(kAudioObjectSystemObject, &theAddress, 0, NULL, sizeof (CFRunLoopRef),
&theRunLoop);


This should probably be the first call into the HAL that the process
makes. So sticking it somewhere near the beginning of main() is a good
idea.



Thanks that fixed the problem!

Excellent.


Any other possible breaking change that SL introduces?

After so long in development, I'm sure there are others. But this one was a pretty big one.



Is there any CoreAudio change list somewhere?

Not to my knowledge.


--

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: Recommended way to handle suspend/resume on notebooks (From: Stéphane Letz <email@hidden>)

  • Prev by Date: Re: Recommended way to handle suspend/resume on notebooks
  • Next by Date: AudioUnitRender returning -10863 if no input device is present
  • Previous by thread: Re: Recommended way to handle suspend/resume on notebooks
  • Next by thread: ExtAudioFileSetProperty ClientDataFormat error on iPhone
  • Index(es):
    • Date
    • Thread