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
Developer
Posts: 21
Registered: ‎09-12-2009
My Device: Not Specified

can someone please identify this blackberry audio format?

I am following:

 

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

 

and I am able to record PCM and AMR on my curve 8900 without problems.  However, when I attempt to record in GSM format, I am getting data that I do not recognize.  The first 32 bytes of the data I am getting is always

 

A0 00 00 00 00 00 00 00 00 00 00 00 04 01 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00

 

This doesn't make any sense because a normal 33-byte GSM 6.10 frame should at the very least begin with 0xD in the high nibble of it's first byte.  Is the gsm data wrapped up in some container I don't recognize? The audio file is growing as I record longer and the first 32-bytes are always as above so its not just garbage data.  I am just recording from a player with either capture://audio?encoding=gsm or capture://audio?encoding=x-gsm.

 

My curve OS version is 4.6.1.250 and I have tried compiling with components packages 4.6 and 4.7 with the same results...

Developer
Developer
Posts: 21
Registered: ‎09-12-2009
My Device: Not Specified

Re: can someone please identify this blackberry audio format?

well the blackberry media player is able to play back the gsm audio, but I still have no idea what format the audio is in? sox, vlc, quicktime, etc. are all unable to play it.. if its not GSM 6.10, can anyone point me to something which may be able to identify what format GSM audio is recorded on the blackbery?
Developer
Posts: 709
Registered: ‎09-10-2009
My Device: 8520, 8900, 9000, 9300, 9650, 9700, 9780, 9800, 9810, 9900, 9930
My Carrier: Verizon

Re: can someone please identify this blackberry audio format?

Anyone has the answer to this?

Developer
Posts: 562
Registered: ‎09-30-2009
My Device: Not Specified

Re: can someone please identify this blackberry audio format?

Can someone create a file and put it somewhere for download? I've no promises, but I can take a stab at it.

Developer
Posts: 709
Registered: ‎09-10-2009
My Device: 8520, 8900, 9000, 9300, 9650, 9700, 9780, 9800, 9810, 9900, 9930
My Carrier: Verizon

Re: can someone please identify this blackberry audio format?

Here is a sample. It can be played by the BB media player but not WavePad.

 

http://www.mediafire.com/?wlrgtb3ykri

 

The file name is Recording.gsm

 

Please let us know what you can find.

Developer
Posts: 562
Registered: ‎09-30-2009
My Device: Not Specified

Re: can someone please identify this blackberry audio format?

I've had a look at it and had some outside assistance from someone who's much more familiar with GSM than I; it seems to be WAV-packed GSM with a non-WAV header attached to it (14787 - 32 bytes = 14755 bytes, which is a multiple of 65 bytes, two GSM frames).

Developer
Posts: 709
Registered: ‎09-10-2009
My Device: 8520, 8900, 9000, 9300, 9650, 9700, 9780, 9800, 9810, 9900, 9930
My Carrier: Verizon

Re: can someone please identify this blackberry audio format?

So. If I replace that header with a wav header, windows media player should be able to play it.  No? As a matter of fact, I have tried that with WavePad (which can read raw gsm), but it didn't work out. I might unpack it and try again.  Thanks for helping.

Developer
Posts: 709
Registered: ‎09-10-2009
My Device: 8520, 8900, 9000, 9300, 9650, 9700, 9780, 9800, 9810, 9900, 9930
My Carrier: Verizon

Re: can someone please identify this blackberry audio format?

Still not working with a wav header. Any idea?

Developer
Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.3.2.858, Z10 (STL100-3)-10.3.1.2576, Z30 (STA100-5)-10.3.1.2582, Passport (SQW100-1)-10.3.1.2576, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: can someone please identify this blackberry audio format?

I know its been mentioned that RIM uses a custom format for recording and when you do RecordControl.commit() it converts it to the format requested. I have no experience with it but I know there was someone on these forums, can't remember who/what post, that had seemingly figured it out but he specified that he wasn't giving it out for free.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Developer
Posts: 709
Registered: ‎09-10-2009
My Device: 8520, 8900, 9000, 9300, 9650, 9700, 9780, 9800, 9810, 9900, 9930
My Carrier: Verizon

Re: can someone please identify this blackberry audio format?

[ Edited ]

So RIM is keeping it a secret. Not a very good business practics

 

 

EDIT:

-- when you do RecordControl.commit() it converts it to the format requested

 

Even if this works. It won't help my situation as I am using a custom output stream to send the recorded data away in realtime.