title: android gdx sound performance issue
body: <p>I'm building a scrolling shooter with libgdx. in windows, everything runs just fine, but on android i get noticeable jitter and the framerate drops from 61 fps avg without sound to 48-56 fps avg with sound. it plays a lot of small sound effects concurrently as there are a lot of bullets to fire and enemies to hit at once. my sound routine:</p>
  
  <pre><code>import com.badlogic.gdx.Gdx;
  import com.badlogic.gdx.audio.Sound;
  
  public class SoundFX {
  
      static final int BGDIE = 1, BGHIT = 2, BGLASER = 3, BGSPAWN = 4, PDIE = 5, PHIT = 6, PLASER = 7, PSPAWN = 8, PAUSE = 9;
      Sound S_BGDIE, S_BGHIT, S_BGLASER, S_BGSPAWN, S_PDIE, S_PHIT, S_PLASER, S_PSPAWN, S_PAUSE;
  
      public void load()
      {
          S_BGDIE = Gdx.audio.newSound(Gdx.files.internal("data/sfx/badguydie.mp3"));
          S_BGHIT = Gdx.audio.newSound(Gdx.files.internal("data/sfx/badguygothit.mp3"));
          S_BGLASER = Gdx.audio.newSound(Gdx.files.internal("data/sfx/badguylaser.mp3"));
          S_BGSPAWN = Gdx.audio.newSound(Gdx.files.internal("data/sfx/badguyspawn.mp3"));
          S_PDIE = Gdx.audio.newSound(Gdx.files.internal("data/sfx/playerdie.mp3"));
          S_PHIT = Gdx.audio.newSound(Gdx.files.internal("data/sfx/playergothit.mp3"));
          S_PLASER = Gdx.audio.newSound(Gdx.files.internal("data/sfx/playerlaser.mp3"));
          S_PSPAWN = Gdx.audio.newSound(Gdx.files.internal("data/sfx/playerspawn.mp3"));
          S_PAUSE = Gdx.audio.newSound(Gdx.files.internal("data/sfx/pause.mp3"));
      }
  
      public void unload()
      {
          S_BGDIE.dispose();
          S_BGHIT.dispose();
          S_BGLASER.dispose();
          S_BGSPAWN.dispose();
          S_PDIE.dispose();
          S_PHIT.dispose();
          S_PLASER.dispose();
          S_PSPAWN.dispose();
          S_PAUSE.dispose();
      }
  
      public void play(int id)
      {
          switch(id)
          {
          case BGDIE:
              S_BGDIE.play();
              break;
          case BGHIT:
              S_BGHIT.play();
              break;
          case BGLASER:
              S_BGLASER.play();
              break;
          case BGSPAWN:
              S_BGSPAWN.play();
              break;
          case PDIE:
              S_PDIE.play();
              break;
          case PHIT:
              S_PHIT.play();
              break;
          case PLASER:
              S_PLASER.play();
              break;
          case PSPAWN:
              S_PSPAWN.play();
              break;
          case PAUSE:
              S_PAUSE.play();
              break;
          default:
              System.out.println("invalid sfx call");
              break;
          }
      }
  }
  </code></pre>
  
  <p>play gets called roughly 4-10 times a second depending on what's happening in the game, the sound effects are less than a second in duration and on avarage 8kb each.</p>
  
  <p>what's going on here, and how can i fix this? it makes the game look very unprofessional and on hard levels almost unplayable.</p>