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
Contributor
krishna85
Posts: 36
Registered: ‎10-12-2012
My Device: developer
Accepted Solution

how to create a voice recorder with pause, insert and overwrite option

i want to create a voice recorder in which i can insert an audio in between already created voice file.It should be able to record audio, then retrieve it later and play, insert a new recording into the present file ,overwrite the files. please help!!!!

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: how to create a voice recorder with pause, insert and overwrite option

to capture audio:
http://supportforums.blackberry.com/t5/Java-Development/Record-Audio-on-a-BlackBerry-smartphone/ta-p...

playback:
http://supportforums.blackberry.com/t5/Java-Development/Audio-and-Video-Playback/ta-p/442788

inserting/overwriting are just byte array manipulations.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Contributor
krishna85
Posts: 36
Registered: ‎10-12-2012
My Device: developer

Re: how to create a voice recorder with pause, insert and overwrite option

if you will not feel angry...can you help me by giving some sample code for inserting and overwriting.... actually iam not getting how to insert and overwrite using byte arrays......

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: how to create a voice recorder with pause, insert and overwrite option

check the first link, you get a byte array as a result:
_data = _output.toByteArray();

if you throw away half of the content you delete the second half of the recording. if you create a bigger array and copy the old and something new into it you append it etc.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Contributor
krishna85
Posts: 36
Registered: ‎10-12-2012
My Device: developer

Re: how to create a voice recorder with pause, insert and overwrite option

can any one provide a sample code for inserting and overwriting recorded voice in an already recorded .amr file....for reference......i am not getting any idea as to how to do it... i am newbie here.....