mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 03:52:50 +08:00
fix(audio): tighten gateway voice backpressure
This commit is contained in:
1 parent
a6187c18af
commit
7ff6836a7e
1 file changed
+4
-3
@@ -22,9 +22,10 @@ const AUDIO_FRAME_BYTES = 1_920;
|
||||
// A browser audio frame is 20 ms of mono 48 kHz PCM. Keep the server-side
|
||||
// WebSocket egress queue small enough that a slow browser cannot turn old
|
||||
// voice into seconds of latency. Opus frames are variable-sized, so this is
|
||||
// deliberately a byte backpressure guard; the browser also enforces a
|
||||
// time-based playback limit before scheduling decoded audio.
|
||||
const MAX_SERVER_AUDIO_BUFFERED_BYTES = 16_384;
|
||||
// deliberately a conservative byte backpressure guard for roughly 10–20
|
||||
// small Opus frames; the browser also enforces a time-based playback limit
|
||||
// before scheduling decoded audio.
|
||||
const MAX_SERVER_AUDIO_BUFFERED_BYTES = 4_096;
|
||||
|
||||
export interface VoiceBridgeOptions {
|
||||
joinTickets: JoinTicketStore;
|
||||
|
||||
Reference in new issue
Block a user