title: Button Plays Drum onClick
body: <p>So it works for awhile at first. Then afterwards none of the buttons work after that. How do I keep the buttons work? Also how do I reduce latency and make it even more responsive(less lag)</p>
  
  <p>Here is my onCreate Activity where I start it all: </p>
  
  <pre><code>public class Drum extends AppCompatActivity {
      Button bass;
      Button snare;
      Button kick;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_drum);
          bass = (Button) findViewById(R.id.bass);
          snare = (Button) findViewById(R.id.snare);
          kick = (Button) findViewById(R.id.kick);
          final MediaPlayer mp = new MediaPlayer();
          mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
              @Override
              public void onCompletion(MediaPlayer mp) {
                  mp.reset();
                  mp.release();
  
              }
          });
          bass.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
  
                  mp.create(getApplicationContext(), R.raw.bass).start();
                  mp.release();
  
                  //sounds.play(bassID, 100, 100, 1, 0, 1f);
                //  bassplay.reset();
  
              }
          });
          snare.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
  
                //  SoundUtility.PlaySound(mp, R.raw.snares, getApplicationContext());
                  mp.create(getApplicationContext(), R.raw.snare).start();
  
  
                  //snareplay.start(); // no need to call prepare(); create() does that for you
                  //snareplay.reset();
              }
          });
          kick.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  mp.create(getApplicationContext(), R.raw.kick).start();
                  //kickplay.start(); // no need to call prepare(); create() does that for you
                  //kickplay.reset();
  
              }
          });
      } //END OF ONCREATE
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.menu_drum, menu);
          return true;
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          // Handle action bar item clicks here. The action bar will
          // automatically handle clicks on the Home/Up button, so long
          // as you specify a parent activity in AndroidManifest.xml.
          int id = item.getItemId();
  
          //noinspection SimplifiableIfStatement
          if (id == R.id.action_settings) {
              return true;
          }
  
          return super.onOptionsItemSelected(item);
      }
  }//end of activity
  </code></pre>