Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

thelatinist

macrumors 603
Original poster
Aug 15, 2009
5,937
51
Connecticut, USA
It has frequently been said that backgrounded streaming audio apps do not actually remain active in memory, but merely hand over their streaming task to the OS. I, too, thought this was how it worked, but I can now confirm that this is not true. Streaming audio apps run in the background on iOS in a way that is indistinguishable from natively-multitasking apps like iPod!

I have a jailbroken 3GS and can verify that both the Pandora and Tunein Radio processes continue to run in the background when closed just like native apps. I have Pandora streaming in the background right now and can tell you that its process is definitely running and is using 16.3 MB of memory.

Not only that, but the processes do not close even when the music is paused and the app window is closed. I just stopped playing music in Pandora and closed the Pandora window. It continues to run in the background and is using 15.3 MB of memory.

Manually closing the app using the tap-hold-close method in the multitasking bar does actually close the app.

I suspect that if the OS needs memory it will close such an app. I don't think it really changes how we will interact with our phones, and we shouldn't need to manually close things as long as iOS manages memory effectively. Still, this is not how most of us understoodd the APIs working...
 
Running in the background and using up memory are different.

It could be loaded into memory but using zero cpu, similar to what a ton of programs are doing on your computer at home (especially Windows based ones). So when you need the application it is already loaded into memory and it starts back quick.

I don't see anything wrong here?
 
Many of us believed that such applications were not actually backgrounded, but that the playing of their streams was handled by the OS itself. I have read this countless times on this board. This does not appear to be the case. The applications remain running and appear to be handling the streaming themselves.

I am not saying that this is a problem, only that it is not how I (and many of the people who post here regularly) understood that it worked.
 
Many of us believed that such applications were not actually backgrounded, but that the playing of their streams was handled by the OS itself. I have read this countless times on this board. This does not appear to be the case. The applications remain running and appear to be handling the streaming themselves.

I am not saying that this is a problem, only that it is not how I (and many of the people who post here regularly) understood that it worked.

You thought wrong, and nothing I read/watched led me to that conclusion at all.
 
Many of us believed that such applications were not actually backgrounded, but that the playing of their streams was handled by the OS itself. I have read this countless times on this board. This does not appear to be the case. The applications remain running and appear to be handling the streaming themselves.

I am not saying that this is a problem, only that it is not how I (and many of the people who post here regularly) understood that it worked.

The application is not entirely running though. It's just running the core services.
 
Many of us believed that such applications were not actually backgrounded, but that the playing of their streams was handled by the OS itself. I have read this countless times on this board. This does not appear to be the case. The applications remain running and appear to be handling the streaming themselves.

I am not saying that this is a problem, only that it is not how I (and many of the people who post here regularly) understood that it worked.

How would the OS then update the stream, handle next/previous and pause commands to the server? The OS merely assigns it controls much like your Apple IR Remote does.
 
Did you not believe Steve?

Steve never said that they were going to run these apps in the background a la Backgrounder, and I am definitely not the only one around here who's been under the impression that apps would not remain open when "multitasking." And almost everyone has been ridiculing people who suggested that such apps would continue to take up memory and might (conceivably) affect performance. I'm just pointing out that we've been wrong.
 
Alright, they actually are running in the background, but it is not the same as Backgrounder.

Background State Apps

This is a special state, applicable only to certain types of apps. These are true background apps given CPU time while working behind the scenes, but are only able to use resources to perform a specific task. I think the easiest way to explain this is to discuss the details of how a few apps work.

Pandora (Background Audio)
You are jamming with Pandora as you always have, but then decide to check out a band’s website. You press the *home button to leave Pandora and fire up Safari. As a background audio app, Pandora is not put into the suspended state, but remains running as long as it’s streaming audio. When running in the background, the app must only use system resources to process the audio stream. For example, when a song changes, Pandora will not update the screen view to show the new artist info, as this would be a waste of CPU resources for something the user can’t see. A task like this can easily be taken care of when you return to Pandora as it’s moving from the background to the foreground. So after an hour of rocking out with Pandora you notice your battery is getting low, how do you stop it from running in the background? Easy, the same way you do now with the iPod app, just go into the app and hit pause. The only way Pandora is allowed in the background is if there is music streaming, so this time when you leave the app it’s sent to the suspended state.

http://whenwillapple.com/blog/2010/04/19/iphone-os-4-multitasking-explained-again/
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.