Hi! I had the same problem at first when using ccrtp. It might be because you are starting the timstamp at zero.
When starting to stream a file, the first timestamp should be session->getCurrentTimestamp(). After this, the timestamp should be increased as you have done (for audio 8khz that is). If the timstamp starts at zero, the first packets might be to old to be sent and are therefore discarded by ccrtp. You can also specify the "expire"-timeout by calling session->setExpireTimeout(microtimeout_t). Hope this solves your problem! -Jörgen -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joseph Monti Sent: den 21 mars 2006 00:37 To: [email protected] Subject: [Ccrtp-devel] beginning of audio clipped Hi, 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! Thanks! - Joe -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= [ Joseph Monti _ __ __ _ __ ] [ Software Engineer | | / /__ ___ ___/ /__ ___| | / /__ __ __ ] [ VoodooVox, Inc. | |/ / _ \/ _ \/ _ / _ \/ _ \ |/ / _ \\ \ / ] [ 413-663-2816 |___/\___/\___/\_,_/\___/\___/___/\___/_\_\ ] [ [EMAIL PROTECTED] ] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= _______________________________________________ Ccrtp-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/ccrtp-devel _______________________________________________ Ccrtp-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/ccrtp-devel
