Skip to content

Latest commit

 

History

History
75 lines (52 loc) · 2.75 KB

processor.md

File metadata and controls

75 lines (52 loc) · 2.75 KB

ScreamRouter Technical Overview

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.

High-Level Architecture

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.

Key Components

  1. Configuration Manager (configuration_manager.py)
  2. Audio Controller (audio_controller.py)
  3. Scream Receiver (scream_receiver.cpp)
  4. RTP Receiver (rtp_receiver.cpp)
  5. Source Input Processor (source_input_processor.cpp)
  6. Sink Output Mixer (sink_audio_mixer.cpp)

Process Management and Data Flow

  1. The Configuration Manager (Python) orchestrates the entire system.
  2. Scream Receiver and RTP Receiver (C++) listen for incoming audio streams.
  3. Source Input Processor (C++) handles audio processing for each active source.
  4. Sink Output Mixer (C++) combines audio from multiple sources for each sink.
  5. Processed audio is output to the configured destination (UDP, TCP, or MP3 stream).

Audio Processing Capabilities

  • 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

Performance Optimizations

  • 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

Configuration

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.

Extensibility

The plugin system allows for adding custom audio sources or processing modules without modifying the core system.

Troubleshooting

Common issues and solutions:

  1. High latency:

    • Check network conditions
    • Reduce buffer sizes if possible
    • Ensure SIMD instructions are enabled
  2. Audio distortion:

    • Verify input audio quality
    • Check for clipping in the audio chain
    • Adjust equalizer settings
  3. 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.