jamulussoftware / jamulussoftware/jamulus

Estimate Overall Delay time calculation too optimistic?

Open
#2,979 3 comments 0 reactions 0 assignees View on GitHub
feature request
Dominant language
C
Stars
1.1k
Forks
248
Avg merge
2d 3h
Merged PRs (30d)
9

Description

**Describe the bug**
This is a very minor thing I guess, but to my understanding the effect of buffering is not shown correcly in the Jamulus main window / not calculated correctly in
CClient::EstimatedOverallDelay. It uses a factor of 0.7 for local and remote buffers - with the comment that the buffers usually a bit larger than required. That may be true, and the achievable delay would be less if the buffers were set correctly.

But I aussume that the display of delay should show the delay **currently experienced**, not the delay potentially achievable with better buffer setting.
Or do I miss something?

**To Reproduce**

No other measurement is available for the real experienced delay, so the value shown may just be off / too low compared to real experienced delay.

**Expected behavior**

My understanding of the buffer implementation is that it evens out network delay and jitter, and adds a fixed delay, so the delay of e.g. a buffer size of 4 is 4 times the block duration.
so the code should read

` const float fTotalJitterBufferDelayMs = fSystemBlockDurationMs * ( GetSockBufNumFrames() + GetServerSockBufNumFrames() );`

instead of
` const float fTotalJitterBufferDelayMs = fSystemBlockDurationMs * ( GetSockBufNumFrames() + GetServerSockBufNumFrames() ) * 0.7f;`

**Operating system**

any

**Version of Jamulus**
3.9.1

**Additional context**

I am prototyping a statisitics console on connection quality that should help to monitor long time quality of connections to the server. So I read a lot of jamulus source code and try to figure out the statistics calculations currently used. This when I encountered this calculation that I do not understand.

Contributor guide

Open the contributing guide

Research direction

Start at CClient::EstimatedOverallDelay and inspect how GetSockBufNumFrames(), GetServerSockBufNumFrames(), and fSystemBlockDurationMs contribute to the displayed delay. Compare the current 0.7 factor with the buffer behavior described in the issue, then verify that the main-window estimate reflects the experienced delay rather than a potentially achievable value.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
audio-video-rtc
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.