Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (604)
Games in Android Showcase (171)
games submitted by our members
Games in WIP (654)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  RMF (sound) and J2ME  (Read 1500 times)
0 Members and 1 Guest are viewing this topic.
Offline jlb

Junior Newbie

« Posted 2005-09-19 06:48:28 »


I'm a mobile sound producer specialized in mobile sound production.
I would like to play a RMF file on targeted mobiles, using JAVA technology, but I
can't find any example of a *.java file.

I' m using a  "" source file and I have changed in the code, the "WAV
informations" by the "RMF ones" .  I built the project and packaged the .jar file using the  Wireless Toolkit and all seems ok.

Naturally the file didn't paly in the phone emulator because it's not linked to RMF
on PC. It would play  on targeted phones but I have to test.

Could you tell me if the code below is ok or not:
From the code writen to play a WAV file I have only changed the file
name/extension and mime type and replaced it by the RMF's ones ( at the end of code).

Could you tell me if it's ok in theory or if I have to make more than change the name/exctension and mime type of WAV file by RMF's ones ?

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class PlayWav extends MIDlet implements CommandListener
private Display display; // Reference to display object
private Form fmMain; // Main form
private Command cmExit; // Command to exit the MIDlet
private Command cmPlay; // Command to play wav file
public PlayWav()
display = Display.getDisplay(this);
// Create commands
cmExit = new Command("Exit", Command.EXIT, 1);
cmPlay = new Command("Play", Command.SCREEN, 2);
// Create Form, add components, listen for events
fmMain = new Form("Play WAV file");
public void startApp()
public void pauseApp()
{ }
public void destroyApp(boolean unconditional)
{ }
* Event handling
public void commandAction(Command c, Displayable s)
if (c == cmExit)
else if (c == cmPlay)
* Play a wav file
public void playwavfile()
// Read wav file, packaged in the jar file
InputStream in = getClass().getResourceAsStream("/sexmachine.rmf");
Player p = Manager.createPlayer(in, "audio/rmf");
catch (Exception e)
// Display an alert
Alert alr = new Alert("Error", "Unable to play WAV file!", null, AlertType.ERROR);
display.setCurrent(alr, fmMain);

Thank you very much

Jean Luc Borla Huh
Offline Abuse

JGO Knight

Medals: 28

falling into the abyss of reality

« Reply #1 - Posted 2005-09-19 09:03:34 »

The mime-type is correct - however, out of the 100s of different phones I have come into contact with  I can think of none that will play rmf files.

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here!
Offline caraiz

Senior Newbie

Java games rock!

« Reply #2 - Posted 2005-09-19 09:11:25 »

The common file formats supported in the phones are midi, wav and amr.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline jlb

Junior Newbie

« Reply #3 - Posted 2005-09-19 18:15:29 »

The common file formats supported in the phones are midi, wav and amr.


Thank you for answer .

I know some phones RMF compatible.
do I  have to change other things than name file and extension and mimetype, in the code ?

Could you provide the same code used for playing a MIDI File ?

Offline caraiz

Senior Newbie

Java games rock!

« Reply #4 - Posted 2005-09-20 08:36:34 »

What the phone supports RMF or other formats dont mean that Java MMAPI will support them.....

Here u have a tutorial of MMAPI

Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

bilznatch (22 views)
2015-08-04 11:03:17

SHC (39 views)
2015-08-01 03:58:20

Jesse (24 views)
2015-07-29 04:35:27

Riven (45 views)
2015-07-27 16:38:00

Riven (25 views)
2015-07-27 15:35:20

Riven (27 views)
2015-07-27 12:26:13

Riven (18 views)
2015-07-27 12:23:39

BurntPizza (41 views)
2015-07-25 00:14:37

BurntPizza (51 views)
2015-07-24 22:06:39

BurntPizza (33 views)
2015-07-24 06:06:53
List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!