Though the RC has been out for some time, and other builds before it, most of the multitasking features have gone relatively untested as they require applications to explicitly use APIs for background functionality. We were excited to play around with background audio today when Pandora released its iOS 4.0 tested, background-audio packing update. As far as we're aware, Pandora Radio is the first and only application in the app store right now supporting background audio playback.

The natural first test was to determine what impact background audio playback has on the battery life of our iPhone 3GSes. To do so, we loaded up our test page which cycles through a loop of article pages and galleries - simulating typical web browsing use - and left pandora playing in the background. Anand was testing over 3G, while I tested WiFi.

After about an hour of testing, I noticed that audio had begun skipping on my iPhone. To be completely honest, at first I thought this was part of the song I was listening to. Then I suspected some sort of buffering issue, but audio stuttering continued to get worse. Finally I decided to interrupt the test and try switching applications, when I noticed the phone had become unresponsive, rejecting all input. Mashing buttons did nothing, including the lock button. It looks like the following, and sounds like a techno song:

While I was sending the video to Anand, his iPhone 3GS running the exact same test but over 3G developed the same audio loop issue, forcing him to reboot. My iPhone eventually fixed itself after about 5 minutes of skipping, resuming audio playback and becoming responsive again. It's still playing right now, but Safari has begun crashing periodically while Pandora is playing in the background. Luckily, the audio has not started skipping again.
It’s difficult to tell at this point whether the issue lies with Pandora or iOS 4.0. Considering normal iPod playback works in the background just fine and possibly uses the same API, it’s entirely possible this a Pandora problem - especially considering it released just today, and this is a new feature. The other possibility is that the combination of our Safari page load test and Pandora in the background is using too much RAM, though iOS 4.0 is supposed to close background applications as the device gets low on RAM.
It also plausible that there's a problem with the scheduler in iOS 4.0. The combination of CPU load from our script, audio playback, and the fact that my iPhone eventually resumed being responsive leads us in that direction.
Either way, background Pandora streaming has become something of a poster child for demonstrating to end users that multitasking works - its execution needs to be flawless before the launch of iPhone 4.


View All Comments

Log in

Don't have an account? Sign up now