I’m new to developing mobile java app’s, and have immediatly hit a wall
I’m trying to play a sound from my disk, and through various sources have come to the following
try {
// Manager.playTone(64,1000,100);
Player p;
InputStream is = null;
is=getClass().getResourceAsStream("wmpaud1.wav");
p = Manager.createPlayer(is, "audio/x-wav");
p.setLoopCount(1); // Play it once
p.realize();
p.prefetch();
p.start();
} catch(IOException ioe) {
} catch(MediaException e) {
}
Actually, when i change the filename, i get an IllegalArgumentException, so my guess is that the sound is indeed found.
However, whatever i do, the sound doesn’t play, is there an error in my ways?
Thanks
Breens Jan