• 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
help request - core audio and iOS4
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

help request - core audio and iOS4


  • Subject: help request - core audio and iOS4
  • From: wm schauweker <email@hidden>
  • Date: Wed, 8 Sep 2010 17:50:02 -0700 (PDT)

I have an audio app in the store. It works just fine with prior versions of the iPhone software, and with iOS4.0. Recently I started to work on a new version, first by bringing the app into compliance with the new iOS4 multitasking capabilities. (In addition to installing the new OS on my iPhone, I upgraded to the latest SDK.)

The results have been disappointing - at the moment a show-stopper. 

o When the app is initially installed on the iPhone, or when started after the iPhone is completely powered down, the app starts just fine - including starting to play audio that was playing the last time the app was run. 

o If I try to restart the app from the background, the audio - which plays and mixes 1 - n audio streams simultaneously - comes out with a stuttering sound that only I could recognize.

o Another detail: If I call the iPhone, I can either answer or decline the call. In both cases the app comes back. playing as it should.


I am not trying to play anything while in background mode. I simply want to shut things off and bring them back when asked.

Technology: All of the audio logic uses  RemoteIO. (I have plans for someday doing some fairly sophisticated signal processing,) 

Overview of MainViewController:

o viewDidLoad - nothing special 

o didBecomeActive
set self as audio session delegate; 
set the AudioSessionCategory to MediaPlayback; 
set the AudioSessionActive; 
create a Player (see below); 
restart any sounds that were previously playing.

o willResignActive 
save the state of what was playing;
stopAllSounds; 
stop the player.
set the audio session inactive

o didEnterBackground - nothing

o willEnterForeground - nothing  

Overview of Player - my class:

All of the actual playback is in a separate object - a "player". 
constructor
setupRemoteIO
start
AudioOutputUnitStart
stop
AudioOutputUnitStop
player callback
the usual stuff

One other detail: The Player is a singleton. I make sure that the singleton instance is destroyed, and a new one created, in didBecomeActive. Instantiating the singleton actually starts the AudioUnit.


 _______________________________________________
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

  • Prev by Date: Re: ExtAudioFileRead
  • Next by Date: Re: ExtAudioFileRead
  • Previous by thread: Re: iOS4.1, reading sample data while playing audio?
  • Next by thread: Minimum frames per slice?
  • Index(es):
    • Date
    • Thread