I am trying to make a program which needs to play audio files. I am using an InputStream and loading the audio file from a package in the application. Here's the code that loads the file:
It loads and plays properly on the Series 40 5th Ed. SDK emulator. However, on my phone, a Nokia 6102i (Series 40 MIDP 2.0), when I try to load the program, I get an error stating that x-wav is not an accepted format. I tried with an MP3 and got an error that mpeg is not an accepted format.
isFile = getClass().getResourceAsStream("//SFX/ss3.wav");
snare3 = Manager.createPlayer(isFile, "audio/x-wav");
I don't understand what the problem is. Why does it work in the emulator and not on the phone? Did Nokia fail to implement proper Java media support with the phone?