Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration

Configuration Path

Resolution order when --config is not provided:

  1. $XDG_CONFIG_HOME/audiorouter/config.toml — if XDG_CONFIG_HOME is set and non-empty
  2. ~/.config/audiorouter/config.toml — if the file already exists there
  3. Platform-native config directory:
    • Linux/BSD ~/.config/audiorouter/config.toml
    • macOS ~/Library/Application Support/audiorouter/config.toml
    • Windows %APPDATA%\audiorouter\config.toml

Print the resolved path for your system:

audiorouter config-path

Relative paths passed with --config are resolved against the current working directory.

Config Reference

[engine]

KeyDefaultDescription
sample_rate48000Sample rate in Hz
buffer_size256Buffer size in frames

The entire [engine] table is optional. Missing fields use their defaults.

[[devices]]

KeyRequiredDescription
deviceyesExact device name as reported by list-devices
namenoConfig-local alias used in routes; defaults to device
limiternoEnable peak limiter when this device is used as an output; default false

[[routes]]

KeyRequiredDescription
fromyesSource device alias
toyesDestination device alias
from_channelsyes1-based source channel list
to_channelsyes1-based destination channel list
gain_dbnoGain in dB; default 0.0
mutenoMute this route; default false

from_channels and to_channels must have the same length. Repeat a channel index to duplicate it, for example:

from_channels = [1, 1]
to_channels   = [1, 2]

That maps mono input channel 1 to stereo output channels 1 and 2.

Larger Example

[engine]
sample_rate = 48000
buffer_size = 256

[[devices]]
name = "vt4"
device = "VT-4"

[[devices]]
name = "mic"
device = "MacBook Pro Microphone"

[[devices]]
name = "blackhole"
device = "BlackHole 2ch"
limiter = true

[[devices]]
name = "speaker"
device = "MacBook Pro Speakers"

[[routes]]
from = "vt4"
to = "blackhole"
from_channels = [3, 4]
to_channels = [1, 2]
gain_db = 0.0

[[routes]]
from = "mic"
to = "blackhole"
from_channels = [1, 1]
to_channels = [1, 2]
gain_db = -8.0

[[routes]]
from = "vt4"
to = "speaker"
from_channels = [3, 4]
to_channels = [1, 2]
gain_db = -12.0
mute = false