From 25f5b1124dae2496c5d4e7503a3e4e10351770cd9a5b9ed9ad6c40b54c11ba1c Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Thu, 11 Apr 2024 20:03:57 +0300 Subject: [PATCH] 24Kbps is more than enough actually --- doc/proto.texi | 6 ++---- internal/audio.go | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/doc/proto.texi b/doc/proto.texi index ead9def..a8d9b3d 100644 --- a/doc/proto.texi +++ b/doc/proto.texi @@ -15,10 +15,8 @@ handshake procedure with the server and is shared among other participants. Stream identifier with packet counter are used as a nonce. Only 64-bits of Poly1305 are used. -It is tuned for 32Kbps bandwidth. 24Kbps should be enough, but 40B of -IPv6 header, +8B of Poly1305 authentication tag, +4B of stream -identifier with the counter, +8B of UDP header for 50pps means also -24Kbps of bandwidth only for overhead transmission. +It is tuned for 24Kbps bandwidth. But remember that it has additional 8B +of MAC tag, 4B VoRS, 8B UDP and 40B IPv6 headers. Each client handshakes with the server over TCP connection using @url{http://noiseprotocol.org/, Noise}-NK protocol pattern with diff --git a/internal/audio.go b/internal/audio.go index bc5f725..fc0a266 100644 --- a/internal/audio.go +++ b/internal/audio.go @@ -3,7 +3,7 @@ package internal const ( Rate = 48000 FrameMs = 20 - Bitrate = 32000 + Bitrate = 24000 FrameLen = FrameMs * Rate / 1000 MaxLost = 32 ) -- 2.44.0