title: j2me problem with playing multiple sound files
body: <p>I have a problem with playing more than 2 sound files in a game I'm developing now in j2me MIDP2 in eclipse.
  Please advice me the best way for playing multiple "wav" sound files.
  I created the following method that is called once when the program starts</p>
  
  <pre><code>public void setSound()
          {
              System.out.println("Sound on");
              try {
                  p1=Manager.createPlayer(is1, "audio/X-wav");
                  p2=Manager.createPlayer(is2, "audio/X-wav");
                  p3=Manager.createPlayer(is3, "audio/X-wav");
              } catch (IOException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              } catch (MediaException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              }
          }
  </code></pre>
  
  <p>and every time I need to play one of the sounds I stop the two other players (to insure that no one of them is running <code>p2.stop(); p3.stop();</code>) and start the third one (<code>p1.start();</code>) and every time I have two players stopped (being in PREFETCHED State) the third one is not running and exceptions are thrown.</p>