/*
 * Created on Dec 31, 2003
 *
 * To change the template for this generated file go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
package com.ociweb.midp2;

import java.io.IOException;
import java.io.InputStream;

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

/**
 * @author balbes
 *
 * To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
public class PlayRecordedSoundMIDlet extends MIDlet {
	
	protected void pauseApp() {}
	
	protected void destroyApp(boolean unconditional){}
	
	protected void startApp() {
		try {
            String type = "audio/x-wav";
            InputStream sourceStream = getClass().getResourceAsStream("/audio/bark.wav");
			Player player = Manager.createPlayer(sourceStream, type);
            player.start();
		} catch (MediaException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
        }
	}	
}
