doubango icon indicating copy to clipboard operation
doubango copied to clipboard

Packetization - not using ptime parameter correctly

Open AndrejHafner opened this issue 6 years ago • 0 comments

Hello, we found out that the parameter ptime (packetization time) which is 20 by default isn't being correctly used by the library. The reverse times on wireshark are correct (delta ms = 20), but the forward (outgoing packets) have different deltas, but they form a pattern. Here's a picture from RTP stream analysis:

doubango_graph_rtpstream-pic

Both graphs should be at around ~20ms, but the forward graph isn't.

Here's the data:

posnetek zaslona 25

We would like that both times would be same as ptime parameter.

Thank you in advance!

EDIT: I have found out that the delay happens when capturing the sound from DirectSound API. The delay occurs at line 84 in tdav_producer_dsound.c .

dwEvent=WaitForMultipleObjects(TDAV_DSOUND_PRODUCER_NOTIF_POS_COUNT,dsound->notifEvents,FALSE,INFINITE);

On average the delay is same as ptime(20ms), but it is actually something like: 30-30-0-30-30-0 (ms) and so on instead of 20-20-20-20-20 (ms).

AndrejHafner avatar Jun 18 '18 11:06 AndrejHafner