title: MediaPlayer - creating more than one instance?
body: <p>I have some balls floating on the screen. When they collide I play a sound with MediaPlayer.</p>
  
  <pre><code>  public static MediaPlayer create(Resources resources ) {
      try {
  
          AssetFileDescriptor afd = resources.openRawResourceFd(R.raw.collide);
          MediaPlayer mp = new MediaPlayer();
          mp.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength());
          afd.close();
          mp.prepare();
          return mp;
      } catch (IOException ex) {
          Log.d("", "create failed:", ex);
          // fall through
      } catch (IllegalArgumentException ex) {
          Log.d("", "create failed:", ex);
          // fall through
      } catch (SecurityException ex) {
          Log.d("", "create failed:", ex);
          // fall through
      }
      return null;
  }
  
  
  
  
    private  void moveBalls(){ //
      for (int i = 0; i &lt; balls.size(); i++) {
          Ball ball1 = balls.get(i);
          for (int a = i + 1; a &lt; balls.size(); a++) {
              Ball ball2 = balls.get(a);
              if(ball1.isColliding(ball2)){
                 ball1.Collide(ball1,ball2);
                  catchMP = create(resources);
                  catchMP.start();
              }
          }
      }
      for(Ball ball : balls){
          ball.step();
      }
  }
  </code></pre>
  
  <p>I've already tried methods .stop, .release, checking if it's null - everything.</p>
  
  <p>So. When there are two-four balls everything is fine, it plays normally. When there comes 6-100 balls it stops playing and after a time it starts again (with these sounds that were gone). They are freezing somehow.</p>
  
  <p>Is there any option to solve that?</p>