Dynamic Audio Object Reassignment in Ecasound
Ecasound does not support seamless, zero-latency dynamic reassignment of audio objects between chains while the engine is actively processing audio. In order to move an audio input or output object from one chain to another, the real-time processing loop must be temporarily stopped, the chains reconfigured via Ecasound's interactive control interface, and the processing engine restarted.
Engine Limitations During Real-Time Execution
Ecasound locks its routing topology during execution. When you run
the start command, Ecasound compiles the current chain
setup into an internal processing graph, allocating buffers and
establishing sample-rate synchronization for all attached audio inputs
(-i) and audio outputs (-o). Because the
engine relies on a static graph to guarantee stable, real-time
performance without buffer underruns, it prevents structural
changes—such as moving, detaching, or attaching audio objects—while
audio is actively streaming.
Modifying Objects Using Ecasound Interactive Mode (ECI)
Dynamic reconfiguration must be handled by transitioning out of the processing state using the Ecasound Control Interface (ECI) or Net-ECI. The workflow requires the following sequence:
- Halt Execution: Issue the
stopcommand to pause real-time processing. - Select the Target Chain: Use
c-select <chain_name>to focus on the chain currently holding the audio object. - Detach the Object: Execute
ai-detach(for audio inputs) orao-detach(for audio outputs) to remove the object from the selected chain. - Switch Chains: Select the destination chain using
c-select <new_chain_name>. - Attach the Object: Use
ai-attachorao-attachto bind the audio object to the new chain. - Resume Execution: Run
startto reinitialize the audio engine with the new topology.
While this process can be automated via control scripts in milliseconds, it will cause an audible interruption or drop in the audio stream.
Alternatives for Seamless Signal Redirection
If your use case requires continuous, glitch-free reassignment of audio routing during live execution, you should employ routing workarounds rather than detaching audio objects:
- Pre-Configured Parallel Chains: Create multiple
chains mapped to the necessary destinations in advance. Instead of
moving audio objects, leave all objects attached and manipulate the
signal dynamically by adjusting chain gain (
-ea) or using muting controllers via ECI while the engine runs. - Loop Devices: Route signals through Ecasound’s
internal loop devices (
loop,id). Loops can act as intermediate audio buses that multiple chains read from and write to simultaneously. - JACK Audio Connection Kit: Run Ecasound with JACK
inputs and outputs (
-i jack -o jack). When using JACK, Ecasound's internal chains remain static, but audio ports can be freely disconnected, reconnected, and reassigned to different software clients or hardware ports in real time without stopping Ecasound.