:: 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
No comments yet.
Leave a comment
-
Archives
- November 2009 (2)
- October 2009 (5)
- June 2009 (2)
- March 2009 (1)
- January 2009 (2)
- December 2008 (1)
- November 2008 (2)
- September 2008 (10)
- August 2008 (3)
- June 2008 (2)
- May 2008 (1)
- May 2007 (11)
-
Categories
-
RSS
Entries RSS
Comments RSS
