title: Play sound on fast clicks android
body: <p>I want to play a sound everytime that a button is pressed.</p>
  
  <p>The problem is that, If I press it fast, then sometimes the sound plays.. But sometimes it does not play.</p>
  
  <p>If I press a button 20 times, (very fast) then the sound should ideally play 20 times. But what happens is that the sound does not get time to complete. It plays 8-9 times on average.</p>
  
  <p>I have initialised my mediaPlayer object. And this seems to work.</p>
  
  <pre><code>mp1.start();
  </code></pre>
  
  <p>I tried the following code too, But this plays the sound only the first time. After that the sound is never played.</p>
  
  <pre><code>if(mp1.isPlaying())
      mp1.stop();
      mp1.start();
  </code></pre>