Josh Guilfoyle wrote:
> Simply using the activities message loop to schedule an update message
> every second.  The resolution of this timer will be sufficient to
> report seconds of play to the user, however if you feel that it is
> necessary to calibrate further you can invoke
> MediaPlayer#getCurrentPosition inside your message handler.

Do be aware that getMediaDuration() is (a) very slow, (b) causes breakup 
of the audio when you call it, (c) is inaccurate --- it bases the length 
on the length of the file in bytes rather than summing the individual 
frames --- and (d) managed to crash when I fed it a malformed .ogg file.

-- 
David Given
[EMAIL PROTECTED]


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to