Problem with play audio file on my phone
Hello guys!
I have a problem with my little application:
I want to play an audio file on my phone (Sony Ericcson k618i).
On WTK2.5 my code runs ok, it play a simple audio file, but on my phone it doesn't work.
Why?
I don't know why!
Please help me.... :(
The code is:
public void run() {
try {
//instead the getResourceAsStream's parameter on wtk2.5 is "/file.wav"
InputStream in =getClass().getResourceAsStream("file:///C:/Music/file.wav");
Player p = Manager.createPlayer(in, "audio/x-wav");
p.realize();
VolumeControl vc = (VolumeControl)p.getControl("VolumeControl");
if (vc != null) {
vc.setLevel(100);
}
p.prefetch();
p.start();
} catch (IOException ioe) {
} catch (MediaException me) { }
}

