cmd

command
v0.0.0-...-3cbcf3d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2025 License: MIT Imports: 11 Imported by: 0

README

Roundtable Client

The client of the Roundtable app. This is what is run by each peer, manages peer to peer connections (once established with the help of the public signalling server), and reads/writes audio data to/from hardware devices.

Config
Key Datatype Default Value Description
loglevel String Enum ("none", "error", "warn", "info", "debug") "info" The level at which logs are recorded. None disables logging.
logfile String nil The filepath to write logs to. If left unset or empty, logs are sent to stdout. The file is truncated before logging begins. If the file cannot be opened for writing, the program panics.
ICEServers List of Strings nil Required. At least one ICE server must be specified, otherwise the program will panic during initialization. Specify the protocol alongside the server, e.g. "stun:stun.l.google.com:19302", "turn:127.0.0.1:1234".
See below for a description of STUN vs TURN.
timeout int 30 Defines the time (in seconds) to wait for a request before timing out.
Codecs list of Strings ["CodecOpus48000Mono", "CodecOpus24000Mono", "CodecOpus48000Stereo", "CodecOpus24000Stereo"] Define the audio codecs to be used when negotiating a connection. The first codec specified is the preferred (but not guaranteed) codec for connections.
Be warned, at least one codec must be common to both peers for a connection to be formed! Furthermore, in general, the higher the sample rate, the higher than bandwidth (same for stereo vs mono).
The valid codecs are: "CodecOpus48000Stereo", "CodecOpus48000Mono", "CodecOpus24000Stereo", "CodecOpus24000Mono", "CodecOpus16000Stereo", "CodecOpus16000Mono", "CodecOpus12000Stereo", "CodecOpus12000Mono", "CodecOpus8000Stereo", "CodecOpus8000Mono".
signallingserver String nil Required. Defines the publicly available IP (or resolvable domain name) and port of the signalling server (see github.com/Honorable-Knights-of-the-Roundtable/signallingserver).
This server forwards SDP offers and answers between roundtable clients, which allows for the connection of users together even behind NAT.
e.g. http://127.0.0.1:1066.
localport int 1066 Defines the local port number to bind to for listening to incoming peer connections from the signalling server.
OPUSFrameDuration Duration Enum (2.5ms, 5ms, 10ms, 20ms, 40ms, 60ms, 120ms) 20ms Defines the frame duration (in milliseconds) to use for OPUS encoding. Longer frame durations introduce more latency, but are more bandwidth-efficient and potentially higher quality.
OPUSBufferSafetyFactor int 16 A (positive) multiplier to all buffer lengths in the OPUSEncoderDecoder. Prevents overwriting of memory (encoded/decoded frames) before it can be consumed. Each buffer in the encoderdecoder is allocated to hold the OPUSBufferSafetyFactor number of frames of raw PCM data. For most devices, encoded frames are encoded and consumed fast enough that no more than a handful of frames need to buffered at once.
A larger OPUSBufferSafetyFactor will result in a greater memory overhead (usually on the order of kilobytes) but more robust encoding and decoding, especially when working in highly parallelized, high throughput environments.
When using a very small OPUSFrameDuration, consider raising the safety factor.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL