Happy to help. It sounds like our apps are fairly similar… here's what I'm doing in rrrrradio, the app I maintain:
1) When the stream starts, I call the RDPlayer:playSources: method with an array of tracks I want to play.
2) Every minute or so, I check a web site that I maintain that keeps an ongoing list of tracks to play, and I load them into an NSArray.
3) I find the index of the currently playing track in this array, and then call the RDPlayer:updateQueue:withCurrentTrackIndex: method. This is the key. This method basically takes the NSArray of tracks you pass to it and updates its own internal queue with new tracks it finds in that list. The player continues playing whatever it was already playing without any interruption. As you can see from the documentation (
http://www.rdio.com/media/static/developer/ios/docs/interface_r_d_player.html#a5dcbc6014bba07ad8f5b6c38ab51e403) it does require you to know the index of the currently playing song. If you don't pass that in properly, you'll see an warning about it in the debug area of Xcode.
If what you're trying to do is *stop* playing the current song and move on to a different one while your app is in the background, your process will be similar. You can use the RDPlayer:updateQueue:withCurrentTrackIndex: method to update the queue so that the song you want to play comes up next, and then call the RDPlayer:next method to advance the player to the next track.
Hope that helps!
> To view this discussion on the web visit
https://groups.google.com/d/msg/rdio-api/-/FANaKxIz6EsJ.
> To post to this group, send email to
rdio...@googlegroups.com.
> To unsubscribe from this group, send email to
rdio-api+u...@googlegroups.com.