08-22-2009 02:18 AM
I am trying to record wave file on Blackberry device.
I have used following code for creatring wav file.
After recording, whenever I try to play it, exception is thrown as un-supported media file.
p = Manager.createPlayer("capture://audio?encoding=pcm
"); p.realize(); RecordControl rc = (RecordControl) p .getControl("RecordControl"); ByteArrayOutputStream output = new ByteArrayOutputStream(); rc.setRecordStream(output); rc.startRecord(); p.start(); Thread.currentThread().sleep(10000); rc.commit(); rc.setRecordLocation("file:///SDCard/BlackBerry/te st.raw"); recordedSoundArray = output.toByteArray(); p.close();
08-24-2009 02:07 AM - edited 08-24-2009 02:17 AM
I tried with foll. extensions: .wav, .amr
Also with encoding types as x-wav, pcm
The file is generated but when I try to play it, it says unsupported format...
I want .wav file to be recorded. Please help....Badly stucked....
08-24-2009 02:36 AM
Check this KB article.
08-24-2009 03:05 AM
08-24-2009 03:21 AM
As my project requirement is .wav file, I tried copying wave file on desktop and play with media player.
Still no luck, media player says file format not supported. Other wav files downloaded over the internet work fine with media player.
08-26-2009 10:51 AM