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:
- Audio Files: Any supported file path, such as
-o output.wav,-o master.flac, or-o mix.ogg. Ecasound automatically detects the file format based on the file extension. - ALSA Sound Architecture: Direct hardware routing
through the Advanced Linux Sound Architecture, written as
-o alsa(default device) or-o alsa,hw:0,0for a specific card and subdevice. - JACK Audio Connection Kit: Connection to the JACK
server using
-o jackor-o jack,systemfor automatic routing to the default hardware playback ports. - Standard Output and Null Devices: Using
-o stdoutto pipe raw audio to another command-line utility, or-o nullto benchmark performance or process effects without generating audio output. - Inter-Chain Loop Devices: Using
-o loop,nameroutes audio back into an input loop (-i loop,name) for complex, multi-stage routing.
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 alsaIn 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 alsaHere, the audio is routed simultaneously to a backup WAV file and the
physical ALSA speakers by using -o twice under different
chain contexts.