Playing an AMR file Q2687 using OpenAT


#1

Hello,

I am using Q2687, Open AT OS version : 6.01.07, Firmware Version: R71. Audio APIs to record (adl_audioStreamListen()) and play (adl_audioStreamPlay()) the audio . it works well there for playing back the recorded audio.

However, I want to understand how I can play a .AMR file (recorded on say a Nokia cellphone) which plays well in QuickTime player on a computer. The same file does not play as is if streamed to OpenAT audio APIs. Similarly if we simply strip off the first 6 bytes header ("#!AMR\n") of the .AMR file, even that does not work. In either way we only hear silence / noise.

Hence the question is: What transformation is required to convert a file recorded as .AMR file from say a cellphone like Nokia, to the AMR (NB) RTP format buffer to play on Q2687 firmware R71?

Can you provide insight into the data structure in which the OpenAT APIs expect the play buffer?

Best Regards,

Rajendra.


#2

Inform yours e-mail, I shall send an example.


#3

How are you doing?


#4

Thank you sobrgsm for helping me here. It is possible to play AMR files either from RAM or from A&D memory.

The problem I was facing was because I wanted to break a long AMR file and I was not breaking it at the frame boundary.

For the AMR-NB files with 4.7Kb/s rate, the frame size is of 13 bytes. So after skipping the initital 6 bytes of AMR header, we can break the AMR file in the multiples of 13 bytes.

Thank you again for helping.

Regards,

Rajendra.


#5

hi, i have similar problems setting up properly the modem for streaming audio over a GSM call.

Can you send me the code-sample by PM?

It could be very useful to me… thanks!

regards


#6

Hiya,

Or event better, post it here in the forum so we can all see how it’s done…

ciao, Dave