How Ecasound Handles Multitrack Sample Accuracy

Ecasound achieves sample-accurate synchronization across multitrack chains through a centralized engine processing loop, unified audio format constraints, rigid block-based scheduling, and low-latency audio driver integration. By synchronizing the processing cycles of all parallel chains to discrete sample frames, the engine ensures that multiple tracks start, process, and mix concurrently without phase drift or timing jitter.

The Central Processing Loop

Ecasound coordinates multitrack audio using an architecture centered around "chains" grouped into a "chainsetup." A chain acts as a signal path containing inputs, operators (effects, filters, controllers), and outputs.

To maintain sample accuracy across separate chains:

Unified Sample Rates and Transport Formats

Sample accuracy requires all parallel streams to share an identical time base. Ecasound enforces this through strict format declarations (-f:sample_format,channels,sample_rate):

Precise Positioning and Offset Alignment

When aligning independent audio clips or live tracks along a shared timeline, Ecasound utilizes sample-exact positioning controls:

Driver-Level Synchronization: JACK vs. ALSA

The audio driver backend selected dictates how the engine translates its internal sample alignment to the hardware layer: