Playing Audio with J2ME
What is the best way to play audio utilzing the J2ME Media libary? For example, should I make use of the MMAPI or should I just use the Midlet's platformRequest(String s) method? The following code should work for 90-95% of handsets out there that support JSR-135. Ordering of all the various method calls is key for this to be portable. This is for sounds local to your JAR. Any streamed audio would be another problem altogether :) // loads the InputStream for the sound InputStream inputStream = this.getClass().getResourceAsStream( musicFile ); // create the standard Player musicPlayer = Manager