I want to get the duration of a ringtone, so I do this:

MediaPlayer mp = MediaPlayer.create(context, sound);
duration = mp.getDuration();

I have two questions:

1. Is there another way of getting the duration?  Maybe I can get it
from the library meta data so that I don't have to create a
MediaPlayer for it when I don't want to actually play it.

2. How do I find out if the sound is a looping sound?  Again, without
playing it.

Thanks in advance

Neil

--~--~---------~--~----~------------~-------~--~----~
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]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to