I'm more than willing to send off $25 if I can get this resolved. I'm trying to play an MP3 as background music for a game. I'm currently testing on the 8300 series emulator and a Curve 8330.
The code looks like this:
InputStream stream = getClass().getResourceAsStream("/MenuMusic.mp3");
Player player = Manager.createPlayer(stream, "audio/mpeg3");
catch (MediaException ex)
catch (IOException ex)
MenuMusic.mp3 is roughly 512KB and is built (compiled into) the COD file by the JDE. I encoded the MP3 with LAME, at the minimum VBR setting. The music is roughly a minute and a half long.
When I run the code in the emulator, the music plays, but it is extremely choppy and it slows the rest of my game to a crawl. When I run it on the actual 8330 device it slows the game to a crawl, but never plays the music.
Obviously, I expect the music to slow down the game significantly, but I know performance should be much better than this (and it should at least start playing) because I can play an MP3 manually in the background on the device without significantly affecting performance of the game. Therefore, I know the device is capable of it.
Referencing the above code, I've also tried calling the Player class's realize and prefetch methods before calling the start method, but I got pretty much the same results in testing.
Any information would be appreciated, and I promise I'll pay up!