doubango
doubango copied to clipboard
Packetization - not using ptime parameter correctly
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:
Both graphs should be at around ~20ms, but the forward graph isn't.
Here's the data:
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).