a more realistic calculation of the network stream rate
This commit is contained in:
parent
ccadb45f11
commit
cbb18ebc03
1 changed files with 5 additions and 2 deletions
|
@ -604,9 +604,12 @@ int CChannel::GetUploadRateKbps()
|
||||||
const int iAudioSizeOut = iNetwFrameSizeFact * SYSTEM_FRAME_SIZE_SAMPLES;
|
const int iAudioSizeOut = iNetwFrameSizeFact * SYSTEM_FRAME_SIZE_SAMPLES;
|
||||||
|
|
||||||
// we assume that the UDP packet which is transported via IP has an
|
// we assume that the UDP packet which is transported via IP has an
|
||||||
// additional header size of
|
// additional header size of ("Network Music Performance (NMP) in narrow
|
||||||
|
// band networks; Carot, Kraemer, Schuller; 2006")
|
||||||
// 8 (UDP) + 20 (IP without optional fields) = 28 bytes
|
// 8 (UDP) + 20 (IP without optional fields) = 28 bytes
|
||||||
return ( iNetwFrameSize * iNetwFrameSizeFact + 28 /* header */ ) *
|
// 2 (PPP) + 6 (PPPoE) + 18 (MAC) = 26 bytes
|
||||||
|
// 5 (RFC1483B) + 8 (AAL) + 10 (ATM) = 23 bytes
|
||||||
|
return ( iNetwFrameSize * iNetwFrameSizeFact + 28 + 26 + 23 /* header */ ) *
|
||||||
8 /* bits per byte */ *
|
8 /* bits per byte */ *
|
||||||
SYSTEM_SAMPLE_RATE_HZ / iAudioSizeOut / 1000;
|
SYSTEM_SAMPLE_RATE_HZ / iAudioSizeOut / 1000;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue