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

ArtOfWarfare

macrumors G3
Original poster
Nov 26, 2007
9,544
6,042
Hi, I'm looking through Apple's docs on Audio sessions (such as this one: http://developer.apple.com/library/...rammingGuide/Configuration/Configuration.html ) and I can't tell whether it's possible to achieve what I want or not:

1 - Get the metadata of the iPod song playing when my app launches.
2 - Pause the iPod when it reaches the end of the current song.
3 - Play the audio for my own app (as AVAudioSessionCategoryPlayback - it should play even if the screen is locked.)
4 - Get the metadata of the iPod song that will play next.
5 - Resume the iPod when my app reaches the end of its own audio.

Ultimately, I want my app to coexist with the iPod. It should respect other audio applications that might be running by not abruptly stopping them when my app is launched (my app will have a button for the user to abruptly stop the iPod and start my app's audio if they want,) but it should stop them as they reach the end of their own audio. When my app reaches the end of its audio, it should resume whatever audio was previously playing.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.