Audio output is fully supported. Audio input (microphone) is currently not supported.
Audio Backends
Ryujinx uses C# wrappers for industry-standard audio libraries, with automatic fallback between backends:OpenAL
Primary - Cross-platform 3D audio library with excellent compatibility
SDL3
Fallback - Simple DirectMedia Layer 3 for broad hardware support
libsoundio
Fallback - Low-latency cross-platform audio I/O library
OpenAL Backend
The primary audio backend uses OpenAL Soft, an open-source 3D audio API:Features
- Cross-platform: Works on Windows, Linux, and macOS
- 3D Positioning: Spatial audio support for immersive games
- HRTF Support: Head-Related Transfer Function for binaural audio
- Multiple Output Devices: Easy device selection and switching
- Low Latency: Minimal audio delay for responsive gameplay
Implementation Details
- Opens the default audio device automatically
- Creates a dedicated update thread for audio processing
- Manages multiple concurrent audio sessions
- Supports volume control per session
OpenAL is automatically selected if available on your system. It provides the best audio quality and performance.
SDL3 Backend
The SDL3 backend provides fallback audio support:Advantages
- Bundled: Comes with SDL3, no extra dependencies
- Reliable: Battle-tested in countless games
- Simple: Straightforward audio output
- Compatible: Works on systems where OpenAL may have issues
SDL3 is the latest version of Simple DirectMedia Layer, completely rewritten for modern systems.
libsoundio Backend
The libsoundio backend offers low-latency audio:Features
- Ultra-low Latency: Optimized for minimal delay
- Backend Flexibility: Uses WASAPI (Windows), ALSA/PulseAudio (Linux), CoreAudio (macOS)
- Sample Rate Conversion: High-quality resampling
- Channel Layout Support: Flexible speaker configurations
Audio Architecture
Ryujinx’s audio system consists of several layers:Audio Renderer
The audio renderer emulates the Switch’s audio processing:Voice Processing
Handles individual audio voices (sound sources) with mixing and effects
Effect Processing
Applies audio effects like reverb, delay, and filters
Mix Buffers
Manages audio mixing for multiple channels and sources
Sink Output
Final output to hardware through selected backend
Audio Effects Supported
| Effect Type | Description |
|---|---|
| Reverb | 3D reverb for spatial audio environments |
| Delay | Echo and delay effects |
| Biquad Filter | Frequency filtering (low-pass, high-pass, etc.) |
| Limiter | Dynamic range compression |
| Auxiliary Buffer | Additional effect processing chains |
| Compressor | Audio dynamics compression |
Sample Format Support
Ryujinx supports multiple audio sample formats:- PCM16: 16-bit signed integer (most common)
- PCM Float: 32-bit floating-point for high precision
- Multiple Sample Rates: Automatic resampling to match your hardware
The target sample rate is 48000 Hz (48 kHz), which matches the Nintendo Switch’s native audio output.
Channel Configuration
Flexible audio channel support:| Configuration | Description |
|---|---|
| Mono | Single channel |
| Stereo | Standard left/right (most common) |
| 5.1 Surround | Six channels for home theater |
| 7.1 Surround | Eight channels for advanced setups |
If a game requests an unsupported channel count, Ryujinx automatically downmixes to stereo.
Device Session Management
The audio system manages multiple simultaneous audio sessions:Session Features
- Independent Volume Control: Each session can have its own volume level
- Sample Rate Conversion: Automatic resampling when needed
- Buffer Management: Circular buffer for smooth audio playback
- Thread Safety: Lock-free audio updates where possible
Audio Buffer Management
Efficient buffer management ensures smooth playback:- Ring Buffers: Circular buffers prevent audio underruns
- Automatic Queueing: Buffers are queued ahead of playback
- Buffer Recycling: Memory-efficient buffer reuse
- Dynamic Adjustment: Adapts to system load
Volume Control
Granular volume management:Master Volume
Global volume control affects all audio output
Per-Session Volume
Individual volume levels for different audio streams
Performance Optimization
The audio system is optimized for minimal CPU usage:- Dedicated Audio Thread: Separate thread prevents audio glitches
- Lock-Free Updates: Concurrent data structures reduce contention
- Efficient Mixing: Optimized audio mixing algorithms
- Hardware Acceleration: Uses audio hardware features when available
Audio Output Latency
Ryujinx aims for low audio latency:| Backend | Typical Latency |
|---|---|
| OpenAL | 20-40ms |
| SDL3 | 30-50ms |
| libsoundio | 10-30ms |
Actual latency depends on your audio driver, hardware, and system configuration. Lower latency provides better audio-visual synchronization.
Current Limitations
Games that require microphone input may:- Skip microphone-related features
- Display warnings or errors
- Work with degraded functionality
Technical Details
Key source directories:- Audio Core:
src/Ryujinx.Audio/ - OpenAL Backend:
src/Ryujinx.Audio.Backends.OpenAL/ - SDL3 Backend:
src/Ryujinx.Audio.Backends.SDL3/ - libsoundio Backend:
src/Ryujinx.Audio.Backends.SoundIo/ - Audio Renderer:
src/Ryujinx.Audio/Renderer/
Troubleshooting
No audio output
No audio output
- Check your system audio settings
- Verify audio device is not muted
- Try switching audio backends if available
- Check Ryujinx volume settings
Audio crackling or stuttering
Audio crackling or stuttering
- Increase audio buffer size if possible
- Close background applications
- Check CPU usage (high load can cause audio issues)
- Update audio drivers
Audio out of sync with video
Audio out of sync with video
- This may indicate performance issues
- Enable VSync to stabilize frame timing
- Try different audio backends
- Check if the game is running at full speed
Game crashes on audio initialization
Game crashes on audio initialization
- Try disabling audio temporarily
- Update audio backend libraries
- Check system audio device compatibility
The audio system is continuously improved with each Ryujinx release, with better compatibility and lower latency.