title: Playing multiple SoundPool at the same time
body: <p>I have a activity that i'm using 12 button with different sound at them.  Buttons should be play at the same time if user click both of them at once.</p>
  
  <p>When i use <code>MediaPlayer</code> i couldn't manage to do this , then i learned about <code>SoundPool</code> and everything was fine.But with 12 different sounds I had to write so many row and i don't think that's the right way to do this.</p>
  
  <p>Is this the right way to do this , when i write this for 12 sound it became to long ?</p>
  
  <pre><code>SoundPool sp1,sp2,sp3;
  int id1,id2,id3;
  
  @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.piano);
  
  sp1 = new SoundPool(1, AudioManager.STREAM_MUSIC,1);
          sp2 = new SoundPool(1, AudioManager.STREAM_MUSIC,1);
          sp3 = new SoundPool(1, AudioManager.STREAM_MUSIC,1);
  
  id1 = sp1.load(this,R.raw.p1,1);
          id2 = sp2.load(this,R.raw.p2,1);
          id3 = sp3.load(this,R.raw.p3,1);
  
  }
  
  public void p1Click(View v)
          {
              sp1.play(id1,1,1,1,0,1);
          }
  
  public void p2Click(View v)
          {
              sp2.play(id1,1,1,1,0,1);
          }
  
  public void p3Click(View v)
          {
              sp3.play(id1,1,1,1,0,1);
          }
  </code></pre>