Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Shyamalp16/CloudGaming/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Thehost.audio section controls audio capture from the target process or system, Opus encoding parameters, WASAPI configuration, and latency optimization.
Process-Specific Audio Capture
Capture audio only from the target process instead of all system audio (requires Windows 11+).Enable process-specific loopback audio capture.Default:
trueWhen enabled, only audio from the target process is captured. When disabled, all system audio is captured.Include audio from child processes of the target.Default:
trueUseful when the main application spawns child processes that also produce audio.Opus Encoding
Opus encoding bitrate in bits per second.Default:
80000 (80 kbps)Recommended ranges:64000(64 kbps) - Minimum quality80000(80 kbps) - Good quality (default)128000(128 kbps) - High quality192000(192 kbps) - Maximum quality
Opus encoder computational complexity.Default:
6Range: 0 (lowest CPU) to 10 (highest CPU)Higher values improve quality at the same bitrate but use more CPU.Opus application type.Default:
2049 (OPUS_APPLICATION_AUDIO)Options:2048- VOIP (optimized for speech)2049- AUDIO (general purpose, music)2051- RESTRICTED_LOWDELAY (lowest latency)
Number of audio channels.Default:
2 (stereo)1- Mono2- Stereo
Opus frame size in milliseconds.Default:
10 msOptions: 2.5, 5, 10, 20, 40, 60Smaller values reduce latency but increase overhead. 10 ms is optimal for low-latency streaming.Error Resilience
Enable Forward Error Correction (FEC) in Opus encoder.Default:
trueFEC embeds redundant data to recover from packet loss. Slightly increases bitrate.Expected packet loss percentage for FEC tuning.Default:
5 (%)Higher values increase FEC overhead but improve resilience.Enable Discontinuous Transmission (DTX).Default:
falseReduces bitrate during silence by not encoding silent frames. Can cause audio artifacts in gaming.WASAPI Configuration
Windows Audio Session API (WASAPI) settings for low-level audio capture.Prefer WASAPI exclusive mode.Default:
falseExclusive mode provides lower latency but prevents other applications from using the audio device.Use event-driven WASAPI mode.Default:
trueEvent-driven mode is more efficient than polling and provides lower latency.Target device period in milliseconds.Default:
5.0 msLower values reduce latency but increase CPU usage and risk of audio glitches.Fallback period if target period is not supported.Default:
10.0 msForce 48 kHz stereo capture format.Default:
true48 kHz is optimal for Opus encoding. Resampling occurs if source is different.Use linear resampling instead of higher quality algorithms.Default:
trueLinear resampling has lower latency. Set to false for better quality at cost of latency.Only use DirectX Media Objects (DMO) for high-quality resampling.Default:
falseLatency Optimization
Advanced latency tuning for ultra-low-latency scenarios.Minimize buffering to single frame.Default:
trueReduces latency but requires consistent system performance.Maximum frame size in milliseconds.Default:
10 msShould match frameSizeMs for lowest latency.Minimum frame size in milliseconds.Default:
10 msEnable strict latency mode with aggressive buffering reduction.Default:
falseLog warnings when buffering exceeds target.Default:
trueUseful for diagnosing audio latency issues.Target one-way audio latency in milliseconds.Default:
40 msEnd-to-end latency target including capture, encode, network, and decode.Enable ultra-low-latency profile with all optimizations.Default:
falseApplies aggressive settings for minimum latency. May reduce quality.Disable FEC in ultra-low-latency mode.Default:
falseTrades error resilience for lower latency.Adaptive Bitrate Control
Dynamic audio bitrate adjustment based on network conditions.Enable adaptive audio bitrate control.Default:
trueAutomatically adjusts bitrate based on packet loss and network quality.Minimum bitrate in bps.Default:
64000 (64 kbps)Maximum bitrate in bps.Default:
128000 (128 kbps)Cooldown period after bitrate decrease.Default:
2000 msInterval between bitrate increases.Default:
10000 msBitrate increase step size in bps.Default:
8000 (8 kbps)Packet loss threshold to trigger bitrate decrease.Default:
0.05 (5%)Packet loss threshold to allow bitrate increase.Default:
0.01 (1%)Number of clean samples before increasing bitrate.Default:
30Packet loss threshold to enable FEC.Default:
0.03 (3%)Packet loss threshold to disable FEC.Default:
0.005 (0.5%)Threading
Pin audio encoder thread to specific CPU cores.Default:
falseCPU affinity mask for encoder thread (bitmask of CPU cores).Default:
0 (no affinity)Example: 0x0F pins to first 4 cores.