On Nov 16, 10:49 am, Cool Frood <[EMAIL PROTECTED]> wrote:
> I'm trying to write play a sound once using a MediaPlayer object:
>
> MediaPlayer p1 = MediaPlayer.create(ctx, R.raw.tick);
> p1.setLooping(false);
> p1.start();
>
> R.raw.tick is a short OGG file. This always causes the MediaPlayer to
> loop. Even if I use an OnCompletionListener, it is never invoked. Is
> this a MediaPlayer bug or am I doing something wrong here?
Update: Yes, there seems to be a bug with playing OGG files using the
MediaPlayer. They loop continuously. I switched to WAV files instead
and they work fine.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---