Repeating a sound

All your problems with Audio, Video and Images.

Repeating a sound

Postby jordanstreet » Tue Jan 04, 2011 6:27 am

Hey guys I'm building a metronome and am using the MediaPlayer.
Code: Select all
MediaPlayer mp;


public void run() {
          if(playing) {
             mp = MediaPlayer.create(getBaseContext(), R.raw.cowbell);
                        playing = true;

the run method is called in regular intervals. There is a delay between the first and second click then it seems to run smoothly. Even so at higher tempos I feel like it is phasing in and out of time. Also the fastest the sound will play is about every 300ms anything faster and there is no noticeable difference.

Any thoughts?

Posts: 2
Joined: Wed Jul 21, 2010 5:30 am


Return to Multimedia Problems

Who is online

Users browsing this forum: Majestic-12 [Bot] and 8 guests