This document provides a technical overview of ScreamRouter's architecture, components, and audio processing capabilities. It is intended for developers and advanced users who want to understand the inner workings of the system.
ScreamRouter is a multi-process audio routing and mixing system designed to receive audio streams, process them, and output them to multiple destinations. It uses a combination of Python for high-level management and C++ for performance-critical audio processing tasks.
- Configuration Manager (
configuration_manager.py
) - Audio Controller (
audio_controller.py
) - Scream Receiver (
scream_receiver.cpp
) - RTP Receiver (
rtp_receiver.cpp
) - Source Input Processor (
source_input_processor.cpp
) - Sink Output Mixer (
sink_audio_mixer.cpp
)
- The Configuration Manager (Python) orchestrates the entire system.
- Scream Receiver and RTP Receiver (C++) listen for incoming audio streams.
- Source Input Processor (C++) handles audio processing for each active source.
- Sink Output Mixer (C++) combines audio from multiple sources for each sink.
- Processed audio is output to the configured destination (UDP, TCP, or MP3 stream).
- Format conversion
- Resampling
- Channel mixing
- 18-band equalizer
- Volume adjustment
Supported audio formats:
- Input: Scream, RTP
- Output: PCM, MP3
- Sample rates: 44.1kHz, 48kHz
- Bit depths: 16-bit, 24-bit, 32-bit LPCM
- C++ used for audio processing to minimize latency and maximize throughput
- SIMD instructions (AVX2, SSE2) used where available for faster processing
- Inter-process communication via Unix pipes for efficiency
The system is configured via a YAML file, which defines sources, sinks, and routes. The Configuration Manager reads this file and sets up the necessary processes and connections.
The plugin system allows for adding custom audio sources or processing modules without modifying the core system.
Common issues and solutions:
-
High latency:
- Check network conditions
- Reduce buffer sizes if possible
- Ensure SIMD instructions are enabled
-
Audio distortion:
- Verify input audio quality
- Check for clipping in the audio chain
- Adjust equalizer settings
-
Missing audio streams:
- Confirm network connectivity
- Verify source and sink configurations
- Check firewall settings
For more detailed troubleshooting, refer to the logs generated by each component.
For more information about ScreamRouter and its features, please refer to the main README and other documentation files in the Readme directory.