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
New Contributor
vraovic
Posts: 3
Registered: ‎05-02-2012
My Device: 9900

Blackberry 7.1 - VoIP audio streaming using PCMU/PCMA codecs

Hi all,

We would like to implement u-law and a-law codecs on our Blackberry 7 VoIP application.

Could you please help us how to construct Player URL to create Player to generate u-law/a-law audio samples or if not possible, to generate 16-bit linear PCM samples in regular time interval:

 

        String playerUrl="capture://audio?encoding=audio/???????????????????????????????";

mPlayer = Manager.createPlayer(lPlayerUrl);

 

Also, how to configure Receive Player to play u-law/a-law or 16-bit linear PCM  audio samples?

 

Your help is very much appreciated.

 

Regards,

vraovic

 

Retired
gsandhu
Posts: 41
Registered: ‎07-14-2008
My Device: Not Specified

Re: Blackberry 7.1 - VoIP audio streaming using PCMU/PCMA codecs

Hi,

 

Please refer to the below knowledge base article on supported audio codec codecs on BB7

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

 

Please note that PCM recording on CDMA devices was only supported starting in OS 7.0

 

Also VoIP support on CDMA was only introduced start in OS 6.0 although GSM devices had this support since OS 4.5.

http://supportforums.blackberry.com/t5/Java-Development/Everything-You-Need-To-Know-About-Simultaneo...

 

Gurtej Sandhu

New Contributor
vraovic
Posts: 3
Registered: ‎05-02-2012
My Device: 9900

Re: Blackberry 7.1 - VoIP audio streaming using PCMU/PCMA codecs

Hi Gurtej,

Thank you for your response. I've looked these links but could not find a hint at all how we need to configure Player to give us a chunk of audio at regular time interval.

We've created Player with the following parameters:

createPlayer("capture://audio?encoding=audio/basic&updateMethod=time&updateThreshold=100")

We are expecting to get 1600 bytes of audio in 100msec time interval. However we got chunk of 2048 bytes of audio in around 120 - 130 msec!?

API reference for 7.1 stated the following:

"If these parameters are not specified or are not valid values they will be ignored, and the recording update method will remain set to the default: data will be written every 1024 bytes."

 

Is this smallest chunk of audio that we could get in 7.1 API for PCM codec or our paramters are not valid?

 

Regards,

vraovic

Retired
gsandhu
Posts: 41
Registered: ‎07-14-2008
My Device: Not Specified

Re: Blackberry 7.1 - VoIP audio streaming using PCMU/PCMA codecs

Hi,

 

The below statement is correct for GSM devices. On GSM devices the default chunk size is 1024 for PCM and non PCM formats and the smallest chunk size in terms of data is 160 bytes and in terms of time is 100 milliseconds.

"If these parameters are not specified or are not valid values they will be ignored, and the recording update method will remain set to the default: data will be written every 1024 bytes."

 

2048 (2KB) is the smallest chunk of PCM data that you can get for multimedia audio recording using PCM format on CDMA devices.

 

Gurtej Sandhu