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
sdcompsc
Posts: 8
Registered: ‎10-13-2011
My Device: Developer
My Carrier: Developer

Re: buffering and playback pcm audio

where are you returning the header?

 

As I explained earlier also,

 

1. Keep a seperate thread to receive RTP packets and store the data in a buffer (after decode may be)

2. The read() method should only need to read as much data from this buffer as is asked for (len argument in read() invokation)

3. You should maintain a flag to track reset() call.

4. Any read call after reset you just return the header. Player will immediately aske for more data, then you return the data from rtp data buffer.

5. use audio/x-wav instead of  audio/pcm

6. Where you can return less that lenth bytesbut not more that that. This will cause exception.

 

Idea of reading rtp data within read() is not a good idea. Also decoding part seems to be wrong.

 

The given header is for 8k sampling of 2 byte sample.

Please use plain text.
New Contributor
indranil
Posts: 5
Registered: ‎07-20-2012
My Device: 9800
My Carrier: Blackberry

Re: buffering and playback pcm audio

RecvStream.java file with G711 implemented over there.

i have the G711.java file

I am unable to call through blackberry

 

Please its uregent ........

 

SipClient blackberry

i am using blackberry simulator 0s6 9800

 

Please help....please help..

Please use plain text.
New Contributor
indranil
Posts: 5
Registered: ‎07-20-2012
My Device: 9800
My Carrier: Blackberry

Re: buffering and playback pcm audio

please provide me the RecvStream.java file...
Please use plain text.
New Contributor
indranil
Posts: 5
Registered: ‎07-20-2012
My Device: 9800
My Carrier: Blackberry

Re: buffering and playback pcm audio

please provide me RecvStream.java file...

 

wtih G711 implemeted..

 

Pelase ..please ...provide this file..

 

Thanks in advance

Please use plain text.