Ecasound -z:intbuf Parameter Explained

The -z:intbuf parameter in Ecasound defines the size of the internal processing buffer used by the audio engine, measured in sample frames. Configuring this parameter directly influences the balance between system latency and audio processing stability during playback, recording, or effect chaining. This article breaks down the technical function of -z:intbuf, how it affects real-time audio performance, and how to select the right buffer size for your workflow.

Purpose of -z:intbuf

In Ecasound, audio is processed in discrete blocks of frames rather than individual samples. The -z:intbuf option specifies the exact number of sample frames allocated to each internal processing cycle.

The syntax for this option is:

-z:intbuf,frames

For example, running ecasound -z:intbuf,512 -i input.wav -o alsa instructs Ecasound to handle audio internally in 512-frame chunks.

Latency vs. Stability

The primary purpose of altering the internal buffer size is managing latency and system throughput:

Interaction with External Buffers

Ecasound differentiates between internal processing buffers and external I/O buffers (configured with -z:extbuf). While -z:extbuf sets the buffer size for hardware input/output subsystems like ALSA or OSS, -z:intbuf dictates how the internal signal chain processes the data between those inputs and outputs.

For the most predictable timing and to prevent unnecessary internal queueing, setting -z:intbuf to match or divide evenly with your external audio hardware period size is recommended. When integrated with JACK audio server routing, Ecasound typically derives timing automatically, but manual tuning with -z:intbuf remains essential when interacting directly with ALSA devices or disk-based workflows.