02-14-2013 06:02 PM
I am trying to play a wav file on the blackberry and the debug is not giving me an Exception to work with. I have imported the wav file ('notify.wav') into my project as a resource (in the 'res' folder). Below is the snippet of code that should play the audio file, but there's no sound when I invoke the method.
InputStream inptstrm =getClass().getResourceAsStream("/res/notify.wav");
Player p = javax.microedition.media.Manager.createPlayer(inptstrm, "audio/x-wav");
VolumeControl volume = (VolumeControl)p.getControl("VolumeControl");
I suspect my issue is with the import and finding where the file is to play.
Any assistance would be greatly appreciated.
02-14-2013 06:25 PM
Agree finding the input file is the trick.
Don't think you need the res, just try
Do put some System.out.println(..) output in your exception handler too.