Ecasound Behavior When Audio Interface Disconnects

When an external audio interface is disconnected while Ecasound is actively processing audio, the underlying audio subsystem abruptly loses its communication endpoint. This unexpected removal triggers low-level I/O errors, causes Ecasound to immediately halt its processing engine, and can leave recording files with incomplete headers. Because Ecasound cannot dynamically hot-swap or re-attach hardware devices during an active chainsetup, the processing session terminates in a failure state.

Driver-Level Failure Detection

Ecasound relies on audio backends such as ALSA (Advanced Linux Sound Architecture) or JACK to communicate with hardware. When a USB or FireWire audio interface is unplugged, the operating system removes the associated device node.

Engine Reaction and Process State

Once the low-level failure is returned to Ecasound's processing loop, the engine's real-time thread breaks:

  1. Error Logging: Ecasound emits critical error messages to standard error (stderr), identifying broken pipes, buffer underruns/overruns, or failure to read/write from the specified audio object.
  2. Engine Halt: The internal processing loop halts. Ecasound does not hang indefinitely; it terminates the active chain execution to avoid runaway CPU loops.
  3. Execution Mode Outcome: In non-interactive batch mode, Ecasound exits back to the terminal shell with a non-zero exit status. In interactive mode (Ecasound CLI), the engine stops running, returning control to the interactive prompt where the chainsetup is marked as stopped or invalid.

File Integrity and Unfinalized Containers

If Ecasound was routing input from the disconnected interface directly to disk, the interruption impacts file integrity:

Recovery and Session Restarting

Ecasound lacks automatic reconnect or hot-plug recovery capabilities. Re-plugging the interface while Ecasound is running will not resume processing.

To restore operation, the user must wait for the operating system to re-enumerate the device, restart any intermediary servers (such as jackd or PipeWire) if they crashed, and manually re-initialize the Ecasound chainsetup from the terminal or interactive interface.