Noob here - Just getting into android programming

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Noob here - Just getting into android programming

Postby djcrunchy » Thu Feb 12, 2009 9:07 am

Hey there, lil bio before I noob it up.

I know my way around more than a few programming languages, and i took java in school, but its far from my strong point.

My question is this..
Whats the best way to play a sound clip repeatedly? The way I'm doing it right now...

Decoration -
MediaPlayer kick1 = MediaPlayer.create(this,R.raw.kick1);

Calling -

...It crashes after.. 27 or so plays...
I spent some time reading, and i tried to figure out the best way to do this, but I'm stuck and so I'm here.
I tried:
-Stopping the clip
-re-preparing the clip;
-setting the seekTo(0) and replaying it..
...All of which either crashed it or did nothing..

Thanks In Advance

Once Poster
Once Poster
Posts: 1
Joined: Thu Feb 12, 2009 9:00 am


Postby bit » Fri Feb 13, 2009 2:57 am

The book Hello Android says MediaPlayer is very touchy; you might check it or its code for using it:
Junior Developer
Junior Developer
Posts: 19
Joined: Thu Dec 11, 2008 7:30 pm


Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 5 guests