Music : onEnd or similar function

  ... the case you feel the need for a new feature or want to submit one.

Music : onEnd or similar function

Postby cpasjuste » Mon Aug 30, 2010 3:15 pm

Hello! I think a callback for the end of a music will be very usefull so if a music is to the end, we could automatically start another one or do something.
cpasjuste
 
Posts: 63
Joined: Tue Jun 22, 2010 3:18 pm

Re: Music : onEnd or similar function

Postby Mimminito » Mon Aug 30, 2010 10:22 pm

This does sound like it could be very useful yes. You could have many uses for this, not just to start another song but to call another method when a certain sound finishes.

I doubt ill be able to look into this until midweek, and Nicolas is quite busy with his personal projects/work/life. So if you could have a dig into the source code and see what you can do, that would be amazing! Im sure the community would appreciate it, I know I would.
---------------------------------------
Adam Goodchild
Your AndEngine Forum Moderator!
My Tutorials List
http://www.adam-goodchild.co.uk
---------------------------------------
Mimminito
 
Posts: 360
Joined: Wed Jul 21, 2010 3:08 pm
Location: Chelsmford, UK

Re: Music : onEnd or similar function

Postby alex » Mon Aug 30, 2010 10:42 pm

why not use Android's MediaPlayer?
they've got the setOnCompletionListener() callback implemented

Register a callback to be invoked when the end of a media source has been reached during playback
alex
 
Posts: 275
Joined: Thu Jul 01, 2010 8:21 pm

Re: Music : onEnd or similar function

Postby cpasjuste » Tue Aug 31, 2010 1:49 pm

cpasjuste
 
Posts: 63
Joined: Tue Jun 22, 2010 3:18 pm

Re: Music : onEnd or similar function

Postby Nicolas Gramlich » Wed Sep 01, 2010 1:03 am

Nicolas Gramlich
Site Admin
 
Posts: 1734
Joined: Mon Jun 07, 2010 6:20 pm
Location: Schriesheim, Germany


Return to Features

Who is online

Users browsing this forum: No registered users and 4 guests