Ecasound -o Option: Assigning Audio Outputs

In Ecasound, the -o option is the primary parameter used to define the destination for processed audio signals, routing data to physical soundcards, audio servers, virtual loops, or local files. This article explains how the -o option works, its relationship with Ecasound's chain architecture, the types of outputs it accepts, and common syntax examples for practical audio routing.

The Function of the -o Option

Ecasound functions as a chain-based audio processing engine where audio flows from inputs (-i), through operators or effect chains (-a), and out to targets specified by -o. The -o option designates the final endpoint of a specific chain. Without defining an output using -o, Ecasound cannot complete a processing setup or play back audio.

When you declare -o in a command, it binds the specified target to whatever chain or group of chains is currently active.

Supported Output Formats and Destinations

The -o option accepts various arguments depending on whether the destination is storage or a real-time playback system:

Working with Chains

In multi-track or multi-channel setups, the placement of -o relative to the chain selection option (-a) determines which tracks route to which outputs.

If multiple chains are active when -o is declared, Ecasound mixes the signals from those chains into that single output.

ecasound -a:1 -i drum.wav -a:2 -i bass.wav -a:1,2 -o alsa

In this example, chains 1 and 2 are combined via -a:1,2 before the -o alsa parameter assigns them both to standard ALSA playback.

Conversely, distinct outputs can be assigned to individual chains to split or duplicate signals:

ecasound -a:1 -i mic.wav -o live_backup.wav -a:2 -i mic.wav -o alsa

Here, the audio is routed simultaneously to a backup WAV file and the physical ALSA speakers by using -o twice under different chain contexts.