Reload Modified Audio Input Files in Ecasound
When working with Ecasound in interactive mode, audio files modified
by external editors do not update automatically because active
chainsetups cache stream descriptors and file metadata. This article
covers how to force Ecasound to reload externally altered audio inputs
without closing your interactive session, detailing the primary command
sequence—cs-disconnect followed by
cs-connect—as well as the targeted input replacement method
using ai-remove and ai-add.
The Standard Method: Chainsetup Reconnection
Ecasound does not include a dedicated single-word command such as
ai-reload. Instead, the standard and most reliable way to
refresh an externally modified input file during an active interactive
session is to disconnect and reconnect the current chainsetup.
To reload all inputs and re-read file headers and lengths from disk, execute the following commands in the Ecasound interactive prompt:
cs-disconnect
cs-connect
Why This Works
cs-disconnect: Detaches the current chainsetup from the audio subsystem and closes all open file descriptors. This releases any lock or cache Ecasound holds on your input files.cs-connect: Re-initializes the signal chains, parses the input files from scratch, re-detects modified sample rates, channel layouts, and updated durations, and prepares the engine for playback or processing.
If playback was active prior to modifying the file, issue
stop before disconnecting, and start after
reconnecting:
stop
cs-disconnect
cs-connect
start
Alternative Method: Targeted Input Replacement
If your session contains multiple complex inputs and you only want to reset one specific file without cycling the entire chainsetup, remove the input stream and attach it again using interactive audio input commands.
- Select the modified input stream:
ai-select [input_name_or_number] - Remove the selected input:
ai-remove - Re-add the file to register the updated version from disk:
ai-add /path/to/modified-file.wav - Attach the re-added file to your desired chain:
ai-attach
Verifying the Reloaded Input
To ensure Ecasound has detected the new duration and audio properties of the externally modified file, query the input status directly:
ai-status
Alternatively, use cs-status to inspect the entire
chainsetup and confirm that total sample counts, durations, and formats
reflect the changes made outside the session.