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:

  1. Halt Execution: Issue the stop command to pause real-time processing.
  2. Select the Target Chain: Use c-select <chain_name> to focus on the chain currently holding the audio object.
  3. Detach the Object: Execute ai-detach (for audio inputs) or ao-detach (for audio outputs) to remove the object from the selected chain.
  4. Switch Chains: Select the destination chain using c-select <new_chain_name>.
  5. Attach the Object: Use ai-attach or ao-attach to bind the audio object to the new chain.
  6. Resume Execution: Run start to 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: