views:

164

answers:

1

I'm having difficulty playing any audio in my j2me application.

I've tried to play a simple tone, only to receive an exception: "Device Busy, cannot play the tone".

I've tried to play an mp3 file that is embedded in my .jar and ended up getting an exception stating that the media contains Unsupported Data.

Here's the code that I used to try to play a simple tone:

try{
    Manager.playTone(ToneControl.C4, 4000, 100);
}catch(Exception e){myForm.append("Exception: " + e.getMessage());}

The code that I used to try and play an mp3 file is located here: http://stackoverflow.com/questions/473809/playing-audio-with-j2me/479948#479948

The device I am using is a Motorola i290

A: 

Try doing your playTone operation in a separate thread.

Ram