• 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: sleep silences music in iPhone OS 2.2?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sleep silences music in iPhone OS 2.2?


  • Subject: Re: sleep silences music in iPhone OS 2.2?
  • From: Allan Schaffer <email@hidden>
  • Date: Fri, 28 Nov 2008 20:18:47 -0800

Hi John,

The default audio session category was changed in iPhone OS 2.2 from MediaPlayback to SoloAmbientSound.  SoloAmbientSound has a number of behaviors that differ from MediaPlayback -- it "obeys" the ringer switch, and it does not continue playback after the display locks.

To change back to MediaPlayback (or another category) you can use the Audio Session API.  

See the Audio Session programming guide (especially "Why a Default Audio Session Usually Isn’t What You Want"):
http://developer.apple.com/iphone/library/documentation/Audio/Conceptual/AudioSessionProgrammingGuide

and also Technical Q&A 1626 - "Ensuring audio playback continues when screen is locked":
http://developer.apple.com/iphone/library/qa/qa2008/qa1626.html

Allan
___________

Allan Schaffer
Graphics Evangelist
Worldwide Developer Relations



On Nov 28, 2008, at 2:07 PM, John Zorko wrote:

Hello, all ...

Since updating to iPhone OS 2.2, my app stops playing audio when the iPhone display goes to sleep.  Pressing the top button on the device awakens audio as well as the iPhone.  My app did not exhibit this behavior in OS 2.1.  How can I enable my app to keep playing even when the display goes to sleep?  I'm aware of the sleep timeout, but I don't want to disable the display from sleeping -- I just want to make my app keep playing music when the display goes to sleep.

Regards,

John

Falling You - exploring the beauty of voice and sound
http://www.fallingyou.com

 _______________________________________________
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: sleep silences music in iPhone OS 2.2?
      • From: John Zorko <email@hidden>
References: 
 >sleep silences music in iPhone OS 2.2? (From: John Zorko <email@hidden>)

  • Prev by Date: QT Audio Streaming
  • Next by Date: Re: sleep silences music in iPhone OS 2.2?
  • Previous by thread: Re: sleep silences music in iPhone OS 2.2?
  • Next by thread: Re: sleep silences music in iPhone OS 2.2?
  • Index(es):
    • Date
    • Thread