:: Think Code Execute ::

Think Code Excute

:: Playing Sound wav with J2ME ::

Heres a simple code how to play a sound with j2me :)

//first import the media library 

import javax.microedition.media.*;


//the now in any place you want to play a sound 

try {

 

 Player  player;

 InputStream  n = in = getClass().getResourceAsStream(“/tds.wav”);

 

             player = Manager.createPlayer(in,”audio/x-wav”);

          player.start();

 

 catch( Exception e)

        { 

        }

 


//Thats it Hope it will helpfull for beginner :)

December 2, 2008 Posted by eshbeata | :: J2ME :: | , , , | No Comments Yet