Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
sarantli
Posts: 122
Registered: ‎09-15-2010
My Device: BB - 9800

How to play a recorded audio file...............???

hi all,

 

                      I'm working on an application which records audio and stores the audio file into file system and plays the audio when clicked on play button. From the below link I'm able to record audio, and stored the data into a byte[ ],  But I dont know how to save the data into file system and what is the file format of the recorded audio file.

               http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/1089414/How_To...

 

 

any help in this regard would b highly appreciated..............

 

regards,

saran.

 

 

 

Retired
Retired
BVP
Posts: 150
Registered: ‎10-19-2010
My Device: Not Specified

Re: How to play a recorded audio file...............???

Hi sarantli!

 

The BlackBerry Multimedia Development guide has what you are looking for, specifically the section on how to record audio in a BlackBerry application.

 

Note that the sample code in the guide at the link above is using RecordControl.setRecordLocation (and not setRecordStream as in the sample code you linked) to save the audio to a file directly.

 

Also, the audio format recorded depends on the locator String you pass into the Manager.createPlayer() method.  The details are in the same link, but "audio/amr" is the default content-type audio is recorded as if no encoding is given in the String.