The question is pretty direct. How can I fade between songs on IOS? I assume it's using MPMusicPlayerController, but I can't figure out the appropriate controls. I can start a song, stop it, etc etc, but I can't fade it in/out (I know about the volume property, but trying to evenly fade that out relies on NSTimer firing more than once a second), much less fade one song out while the next fades in.
Asked
Active
Viewed 609 times
0
-
Duplicate http://stackoverflow.com/questions/6395375/how-can-i-fade-out-the-sound-played-by-mpmusicplayercontroller – borrrden Apr 16 '12 at 01:16
-
Not quite; I need to fade one song in WHILE the next fades out. While the first 'half' of the question could be considered a duplicate, the second half is, IMO, the more important one. – RonLugge Apr 16 '12 at 02:07
-
Then you need two MPMusicPlayers – borrrden Apr 16 '12 at 02:08
-
I'm going to go run an experiment, because for some reason I thought you couldn't have two at once. – RonLugge Apr 16 '12 at 02:08
-
Oh...if that's true I will feel awfully stupid ><; – borrrden Apr 16 '12 at 02:09
-
Well here, this post suggests that you should use AVAudioPlayer instead: http://stackoverflow.com/questions/8744736/how-to-programmatically-crossfade-between-songs – borrrden Apr 16 '12 at 02:10
-
If you intend to play tracks from your iPod music library, then `AVPlayer` is the way to go rather than `AVAudioPlayer` – sooper Apr 16 '12 at 03:09
-
@borrrden Yes you are right. But how can i create two instances of MPMusciPlayerController??? – Abdul Yasin Nov 14 '16 at 07:07