Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 17:28, 24 October 2007.

Como tocar sons no Java ME

From Forum Nokia Wiki

Original: How to Play sound in Java ME

O código a seguir ajudará a tocar sons que estejam dentro de seu arquivo jar.

InputStream is = getClass().getResourceAsStream( "sound.wav");
Player p = Manager.createPlayer(is, "audio/X-wav"); 
p.start();

O código abaixo ajudará a tocar sons que estejam armazenados em um servidor web.

Player p = Manager.createPlayer("http://server/sound.wav"); 
p.start();

Você também pod etentar outros formatos de som fazendo um minimo de alterações no código, por exemplo: modificando o "mime-type".

Related Discussions
Thread Thread Starter Forum Replies Last Post
Problem about Emulator Malcolm83 General Symbian C++ 1 2002-09-17 04:24
launching WAP from a Java app? stevo999999 Mobile Java General 6 2006-03-30 00:02
invoke j2me application from symbian C++ app sridhar_ratna General Symbian C++ 22 2008-03-06 13:10
Java 1.3.1 Installed. SDK still complains about a "non existing 1.3.1" Izarf Symbian Tools & SDKs 2 2004-09-27 09:58
JavaCodeCompact utility issue fsajjad Mobile Java Tools & SDKs 0 2005-07-25 08:21
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX