[android-developers] Re: MediaPlayer sound problem

2009-04-27 Thread Dave Sparks
Use SoundPool. On Apr 26, 9:34 am, BlackLight blacklight1...@gmail.com wrote: I have other problem now. Lets say I have 10 buttons (0-9), when user press button program should play short (0.3-0.5 secs) sound. I added them as wav resources. Now I see that each MediaPlayer creates its own

[android-developers] Re: MediaPlayer sound problem

2009-04-26 Thread BlackLight
I have other problem now. Lets say I have 10 buttons (0-9), when user press button program should play short (0.3-0.5 secs) sound. I added them as wav resources. Now I see that each MediaPlayer creates its own thread and takes resources. I'm not sure that this is good idea to make 10 players. But

[android-developers] Re: MediaPlayer sound problem

2009-04-24 Thread BlackLight
Thanks! I will try MediaPlayer.setLooping(true). With longer sounds it works just fine. I have feeling that error happens because of no sync. MediaPlayer playes and is going to stop, at this moment seekTo makes freeze sound problem. (Just my guess) On Apr 23, 7:18 pm, Marco Nelissen

[android-developers] Re: MediaPlayer sound problem

2009-04-23 Thread Marco Nelissen
Does it work with longer sounds? Have you tried using MediaPlayer.setLooping(true) instead of restarting it yourself from the OnCompletionListener callback? On Thu, Apr 23, 2009 at 12:00 AM, BlackLight blacklight1...@gmail.comwrote: Hello. I have this task: Need to play short (0.3-0.4 sec)