Hi

I found the source of my problem. It was in MpdSipxPcma.cpp and MpdSipxPcmu.cpp 
in function MpdSipxPcma::decodeIn. It returned 0 even when it should have 
returned a positive number. A hack using return pPacket->getPayloadSize(); at 
the beginning of the function made the sound work. But that is not what I want. 
The bug why it didn't work was in
if (mLastSeqNo == -1) block.

mLastSeqNo is unsigned and initialized to 65535 (in constructor its -1 but it 
gets translated to 65..) thus first paket isn't detected.
If I put
 if (!mFirstPacketAccepted)
    {
     mNextPullTimerCount = rtpTimestamp + (160*(mWaitTimeInFrames*2));
     mLastSeqNo = pPacket->getRtpSequenceNumber();
     mFirstPacketAccepted = true;
     // We always accept the first packet
     return pPacket->getPayloadSize();
  }

instead of the if (mLastSeqNo == -1) block there then it works. You have to put 
it into MpdSipxPcma.cpp and MpdSipxPcmu.cpp.
Its better to use a bool to detect first packet, as there would be a problem 
when rtp sequence reaches 65535.
Btw how does GSM and Speex deal with packets out of order due to missing 
decodeIn implementation? I saw they always return a positive number.

Jaro
_______________________________________________
sipxtapi-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/

Reply via email to