Skip to main content

Overview

Audio settings control how TCP Streamer captures audio from your system. These settings directly impact audio quality, latency, and system resource usage.

Input Device Selection

TCP Streamer scans all available audio hosts (WASAPI, MME, CoreAudio, ALSA, PulseAudio) to detect input devices.

Standard Input Devices

Select any physical or virtual audio input device:
  • Physical microphones
  • Line-in connections
  • Virtual audio cables (VB-Audio Cable, BlackHole)
  • Audio interfaces
macOS Users: Install BlackHole or Loopback to capture system audio.

Windows Loopback Mode

Windows users can enable WASAPI Loopback to capture system audio directly without virtual cables.
1

Enable Loopback

Check the “Enable Loopback (Windows)” checkbox
2

Select Output Device

Choose the output device (speakers/headphones) you want to capture from
3

Requirements

Physical speakers or headphones must be plugged in for loopback to work
WASAPI Loopback is more sensitive to network conditions than virtual audio cables. The application automatically uses larger buffers (8000ms default) for stability.

Sample Rate

The number of audio samples captured per second, measured in Hertz (Hz).
sample_rate
integer
default:"48000"
Audio sample rate in Hz
Sample RateUse CaseBitrate (Stereo)
44100 HzCD-quality audio, music playback1411 kbps
48000 HzModern standard, video/broadcast (recommended)1536 kbps

Recommendations

  • 48 kHz: Recommended for most use cases (modern standard)
  • 44.1 kHz: Use if your source content is CD-quality music
Higher sample rates do NOT improve quality beyond the source material. Match the sample rate to your content for best results.

Buffer Size

The hardware audio buffer size in samples. This controls the latency between audio capture and processing.
buffer_size
integer
default:"1024"
Hardware buffer size in samples
Buffer SizeLatency (48 kHz)Use Case
2565.3 msUltra-low latency, high CPU usage
51210.7 msLow latency, balanced
102421.3 msBalanced (recommended)
204842.7 msHigh stability, lower CPU usage

Trade-offs

Smaller buffers (256-512):
  • Lower latency
  • Higher CPU usage
  • More sensitive to system load
  • May cause audio dropouts on slower systems
Larger buffers (1024-2048):
  • Higher latency
  • Lower CPU usage
  • More stable on loaded systems
  • Better for WiFi connections
For most users, 1024 samples provides the best balance between latency and stability.

Ring Buffer Duration

The size of the internal ring buffer that absorbs network jitter, measured in milliseconds.
ring_buffer_duration
integer
default:"4000"
Ring buffer duration in milliseconds (2000-15000)
DurationMemory UsageUse Case
2000 ms~0.6 MBWired connections, low jitter
4000 ms~1.2 MBWiFi connections (recommended)
8000 ms~2.3 MBPoor WiFi, WASAPI Loopback
15000 ms~4.3 MBExtreme conditions, maximum stability

Smart Buffer Sizing by Device Type

TCP Streamer automatically adjusts buffer defaults based on device type:

WASAPI Loopback (Windows)

  • Base ring buffer: 8000ms
  • Adaptive range: 4000-12000ms
  • Best latency: ~4 seconds (wired network)
  • Worst latency: ~12 seconds (WiFi laptop)
Larger buffers are required to handle WiFi jitter, laptop CPU throttling, and WASAPI timing variability.

Standard Input / VB Audio Cable

  • Base ring buffer: 5000ms
  • Adaptive range: 2000-6000ms
  • Best latency: ~2 seconds (wired network)
  • Worst latency: ~6 seconds (WiFi)

How It Works

┌─────────────┐     ┌──────────────┐     ┌─────────────┐
│   Audio     │────▶│ Ring Buffer  │────▶│  Network    │
│  Callback   │     │  (Jitter     │     │  Thread     │
│  (Producer) │     │  Absorber)   │     │ (Consumer)  │
└─────────────┘     └──────────────┘     └─────────────┘
The ring buffer acts as a cushion between audio capture and network transmission:
  1. Audio callbacks push samples into the buffer (producer)
  2. Network thread reads from buffer at precise intervals (consumer)
  3. Buffer absorbs timing differences caused by network jitter
If the buffer fills completely (overflow), audio will be dropped. If it empties completely (underrun), silence will be sent.

Configuration Examples

High-Fidelity Music (Wired)

{
  "sample_rate": 48000,
  "buffer_size": 512,
  "ring_buffer_duration": 2000
}
Lowest latency with excellent stability on wired connections.

Whole-Home Audio (WiFi)

{
  "sample_rate": 48000,
  "buffer_size": 1024,
  "ring_buffer_duration": 4000
}
Balanced configuration for multi-room sync over WiFi.

Challenging Environment (Poor WiFi)

{
  "sample_rate": 44100,
  "buffer_size": 2048,
  "ring_buffer_duration": 8000
}
Maximum stability for unreliable network conditions.

Windows Loopback (WiFi Laptop)

{
  "sample_rate": 48000,
  "buffer_size": 1024,
  "ring_buffer_duration": 8000,
  "is_loopback": true
}
Automatically uses larger buffers for WASAPI loopback stability.

Troubleshooting

Audio Stuttering

Symptoms: Choppy audio, gaps, pops Solutions:
  • Increase ring buffer duration
  • Increase hardware buffer size
  • Enable adaptive buffer (see Advanced Settings)
  • Use wired connection instead of WiFi

High CPU Usage

Symptoms: System slowdown, fan noise Solutions:
  • Increase buffer size to 2048
  • Lower sample rate to 44.1 kHz
  • Disable other CPU-intensive applications

Device Not Found

Symptoms: Input device doesn’t appear in dropdown Solutions:
  • macOS: Grant microphone permissions (System Settings → Privacy & Security)
  • Windows: Ensure device is enabled in Sound settings
  • Linux: Check ALSA/PulseAudio/PipeWire configuration
  • Restart the application after connecting new devices

WASAPI Loopback Dropouts

Symptoms: Frequent audio gaps when using Windows loopback Solutions:
  • Enable adaptive buffer (see Advanced Settings)
  • Increase ring buffer to 10000-12000ms
  • Use wired connection
  • Consider using VB Audio Cable instead for more consistent performance

Build docs developers (and LLMs) love