[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ccrtp-devel] beginning of audio clipped

From: Joseph Monti
Subject: [Ccrtp-devel] beginning of audio clipped
Date: Mon, 20 Mar 2006 18:36:30 -0500


I have been trying to use ccRTP 1.3.6 from Java through a JNI wrapper I
created. I noticed however that the audio data that is sent out over the
network by ccRTP is missing a few thousand bytes off the head of the
audio that I send it. The audio is PCMU. Everything else is fine, but
the transmitted audio is missing the first second or so.

I am using ccRTP in a VoIP/VoiceXML environment where a VoiceXML
interpreter send my service text and I transmit audio back using ccRTP.

I've ran several tests and the amount of audio missing is rarely the
same, but always an exact multiple of the transmitted block size. And it
is always off the head of the audio, the rest is exactly the same. I
tested this by writing the audio to file before I transmitted it through
ccRTP and then captured it with ethereal using its RTP stream analysis
to write the transmitted audio to disk.

Here is how I send the data (from Java):

      int index = 0;
      while (index < wave.length) {
         int len = (index + MAX_SEGMENT > wave.length ? 
               wave.length - index : MAX_SEGMENT);
         putData(index, wave, index, len);

         index += len;

Here 'wave' is a byte array containing my PCMU audio data. The putData
method is just the ccRTP putData method that also takes an offset for
the byte data. I have tried different MAX_SEGMENTS between 128 and 1024,
all with similar results.

I noticed in the examples there is some sleeping between putData calls
but when I tried it I was not able to actually hear the audio on the
receiving end or see any RTP packets in ethereal.

I would normally be inclined to blame my VoIP/VoiceXML environment
(VoiceGenie), but the fact that what I captured in ethereal matched what
I was hearing on the receiving end but didn't match what I was putting
into ccRTP points me at ccRTP.

If you have any questions about my system, need more info/code, or have
suggestions on things I can try, let me know!

 - Joe

[ Joseph Monti       _   __             __        _   __         ]
[ Software Engineer | | / /__  ___  ___/ /__  ___| | / /__ __ __ ]
[ VoodooVox, Inc.   | |/ / _ \/ _ \/ _  / _ \/ _ \ |/ / _ \\ \ / ]
[ 413-663-2816      |___/\___/\___/\_,_/\___/\___/___/\___/_\_\  ]
[ address@hidden                                           ]

reply via email to

[Prev in Thread] Current Thread [Next in Thread]