tags:

views:

27

answers:

1

Hi,

I am getting a list of songs and its corresponding images from a url.The url is a json url. When i click the list a corresponding song is played. I have used AVFoundation Framework to play the song. Now the issue is that i need to play the next song after the playing of first song is completed. The corresponding images also must load. If i click the next or previous button the corresponding songs must be played. What is the best possible mechanism to attain it???

I have read about the Audio Queues and Audio Units but not sure how to use them. I'll be really helpful if i am provided with some sample code of how to do it.

A: 

The easiest thing is to just place an If statement in audioPlayerDidFinishPlaying which is what is called after each sound is played (if playing them with an AVAudioPlayer).

You can also use that to update whatever images you need to as well based on the name.

iWasRobbed
Can u plz explain me with some sample code of how to do that coz i m a newbie to iphone dev...Plzzzz
Rahul Varma
This might get you pointed in the right direction: http://www.iphonedevsdk.com/forum/iphone-sdk-development/27285-play-sequence-audio-files-avaudioplayer.html
iWasRobbed