Run Ecasound Continuously Without Exiting on EOF

The -c (or --interactive) flag allows Ecasound to run continuously without terminating upon reaching the end-of-file (EOF). By default, Ecasound operates in batch mode, automatically closing the process as soon as all audio inputs finish playback or reach EOF. Using interactive mode keeps the Ecasound engine and session alive, enabling interactive command entry, rewinding, file swapping, and real-time parameter tweaking.

Understanding Default Batch Mode vs. Interactive Mode

When invoking Ecasound from the command line without control flags, it processes the defined chainsetup from start to finish and immediately terminates:

ecasound -i input.wav -o alsa

In this default mode, the audio stream reaches EOF, the processing engine halts, and the application exits back to the system shell.

To override this exit behavior, append the -c flag:

ecasound -c -i input.wav -o alsa

With -c enabled, reaching the end of input.wav stops playback, but the Ecasound process does not exit. Instead, it presents an interactive prompt using the Ecasound Control Interface (ECI). From this prompt, you can issue commands such as setpos 0 to rewind, start to restart playback, or cs-load to load new audio chains.

Running Continuously in Background or Headless Setups

If you need Ecasound to stay open continuously without an interactive terminal session—such as in automated or headless server environments—you can use the server flag options:

Continuous Loop Playback

If your goal is to keep the audio output actively playing in an infinite loop rather than merely keeping the application process open, use the loop audio object for the input rather than relying solely on engine flags:

ecasound -i loop,0,input.wav -o alsa

Passing 0 as the loop counter instructs Ecasound to repeat the input file infinitely, preventing the input stream from ever triggering an end-of-file condition.