Wav file player : Audio Player « J2ME « Java Tutorial






import javax.microedition.media.Manager;
import javax.microedition.media.Player;
import javax.microedition.midlet.MIDlet;

public class J2MESimplePlayer extends MIDlet {

  public void startApp() {
    try {
      Player player = Manager.createPlayer(getClass().getResourceAsStream("/b.wav"), "audio/x-wav");
      player.start();
    } catch (Exception e) {
      e.printStackTrace();
    }
  }

  public void pauseApp() {
  }

  public void destroyApp(boolean unconditional) {
  }
}








31.54.Audio Player
31.54.1.Audio Player Demo
31.54.2.Cached Audio Player
31.54.3.Wav file player
31.54.4.Player Event
31.54.5.implements PlayerListener
31.54.6.Network Player Manager
31.54.7.Load WAV file from a web site