Skip to main content
Dolphin emulates the GameCube/Wii Digital Signal Processor (DSP) which handles all audio processing.

DSP Hardware

The DSP is a dedicated audio coprocessor:
FeatureValue
Clock Speed81 MHz
ArchitectureCustom 16-bit DSP
IRAM8192 x 16-bit instructions
DRAM4096 x 16-bit data words
DMABidirectional to main RAM
Location: Source/Core/Core/DSP/

Emulation Modes

Dolphin supports two DSP emulation approaches:
Location: Core/DSP/DSPHLE/Default and recommended. Emulates DSP behavior without running actual DSP code:

Advantages

  • Very fast (low CPU usage)
  • No DSP ROM required
  • Compatible with 95%+ of games
  • Deterministic

How It Works

  • Intercepts DSP UCode (microcode) uploads
  • Identifies known UCode types (AX, Zelda, etc.)
  • Reimplements UCode functionality in C++
  • Outputs audio samples directly

Supported UCodes

  • AX: Most common (Luigi’s Mansion, Mario Kart, etc.)
  • Zelda: Zelda-specific (Wind Waker, Twilight Princess)
  • Card: Memory card operations
  • InitAudioSystem: Boot-time initialization
  • ROM: IPL/BIOS DSP code
[DSP]
EnableJIT = True  # Irrelevant for HLE
Backend = HLE     # Default

Audio Pipeline

Audio flows through these stages:
1

Game Sends Audio Commands

PowerPC CPU sends commands to DSP via mail interfaceLocation: Core/DSP/DSP.cpp
  • Write to DSP mailbox registers
  • Upload UCode to IRAM
  • Send DMA commands for audio buffers
2

DSP Processes Audio

DSP runs UCode to process samplesHLE: C++ implementation mimics UCode LLE: Execute actual DSP instructions
  • Decode audio (ADPCM, PCM)
  • Apply effects (reverb, delay, filters)
  • Mix multiple channels
  • Output to DMA buffer
3

Audio Interface Streams

Audio Interface (AI) streams from DMA bufferLocation: Core/HW/AudioInterface.cpp
  • 32 KHz sample rate (AI default)
  • Stereo output (left/right channels)
  • Trigger AI interrupts on buffer completion
4

Audio Backend Outputs

Backend plays samples through OS audio APILocation: AudioCommon/
  • Resample if needed
  • Send to audio device
  • Handle buffer underruns

Audio Backends

Location: Source/Core/AudioCommon/ Dolphin supports multiple audio output backends:
BackendPlatformsDescription
CubebAllCross-platform (recommended)
WASAPIWindowsWindows Audio Session API
PulseAudioLinuxLinux standard
ALSALinuxAdvanced Linux Sound Architecture
OpenALAllOpenAL Soft
OpenSLESAndroidAndroid native audio
NullAllNo output (testing)

Configuration

[DSP]
Backend = Cubeb       # Audio backend to use
Volume = 100          # Volume (0-100)
AudioLatency = 20     # Latency in ms (lower = less delay, more CPU)
EnableJIT = True      # DSP JIT (LLE only)
Mozilla’s cross-platform audio library:
[DSP]  
Backend = Cubeb
AudioLatency = 20  # 20ms recommended
Advantages:
  • Low latency
  • Reliable on all platforms
  • Automatic device switching
  • Minimal CPU overhead

Audio Settings

Key audio configuration options:
Choose between HLE and LLE:
[Core]
DSPHLE = True   # True for HLE, False for LLE

[DSP]
EnableJIT = True  # LLE JIT compilation
Default: HLE (fast, compatible) Use LLE when: Game has audio issues with HLE
Buffer size in milliseconds:
[DSP]
AudioLatency = 20  # 10-100ms
  • Lower (10-20ms): Less delay, more CPU, potential underruns
  • Higher (50-100ms): More delay, less CPU, smoother audio
Default: 20ms (good balance)
Time-stretch audio to match emulation speed:
[DSP]
AudioStretch = False
StretchFactor = 1.0
Useful when emulation runs slower than 100% speed.
Dolby Pro Logic II decoder:
[DSP]
EnableDPL2 = False  # 5.1 surround from stereo
DPL2Quality = 2     # 0=low, 1=normal, 2=high
Upmixes stereo to 5.1 surround.

DSP UCode Types

Common UCode implementations in HLE:

AX UCode

Location: Core/DSP/DSPHLE/UCodes/AX.cpp Most common UCode for game audio:
  • Multiple voice channels (up to 64)
  • ADPCM and PCM decoding
  • Volume, pitch, and pan control
  • Effects: reverb, chorus, delay
  • Surround positioning
Games using AX:
  • Luigi’s Mansion
  • Mario Kart: Double Dash
  • Super Smash Bros. Melee
  • Most GameCube/Wii games

Zelda UCode

Location: Core/DSP/DSPHLE/UCodes/Zelda.cpp Zelda-specific audio:
  • Sequenced music playback
  • Sound effect triggering
  • Custom mixing
Games using Zelda UCode:
  • The Legend of Zelda: Wind Waker
  • The Legend of Zelda: Twilight Princess
  • The Legend of Zelda: Four Swords Adventures

Card UCode

Memory card audio operations (beeps).

Audio Debugging

Enable audio logging:
[Logging]
EnableLogs = True
LOGSP1 = True    # Audio Interface
LOGDSP = True    # DSP
LOGAudio = True  # Audio backend
DSP debugging tools:
# Dump DSP UCode to file
[DSP]
DumpUCode = True

# Dump audio to WAV files  
[DSP]
DumpAudio = True
Files written to User/Dump/Audio/ and User/Dump/DSP/.

Performance Tuning

[Core]
DSPHLE = True         # Use HLE

[DSP]
Backend = Cubeb       # Efficient backend
AudioLatency = 50     # Higher latency
EnableDPL2 = False    # Disable surround

See Also