Ecasound Audio Resampling Quality Settings
This guide explains how to control audio resampling quality in Ecasound using command-line arguments. When processing streams with mismatched sample rates, Ecasound automatically converts the audio rate. By configuring the appropriate resampling flag, you can balance CPU utilization and audio fidelity according to your production requirements.
The Resampling Quality Argument
In Ecasound, audio resampling quality is specified using the
-z:src,converter_type command-line argument, which
interfaces with Secret Rabbit Code (libsamplerate).
The syntax is:
ecasound -z:src,converter_type -i input.wav -o output.wavSupported Resampling Modes
The converter_type parameter accepts an integer value
from 0 to 4, representing standard
libsamplerate algorithms:
0(Best Sinc Quality): Provides the highest audio fidelity and lowest distortion (SRC_SINC_BEST_QUALITY), with high CPU consumption.1(Medium Sinc Quality): A compromise between quality and speed (SRC_SINC_MEDIUM_QUALITY).2(Fastest Sinc): Fast Sinc interpolation (SRC_SINC_FASTEST) suitable for real-time processing on constrained hardware.3(Zero-Order Hold): Extremely fast non-bandlimited converter (SRC_ZERO_ORDER_HOLD) with high distortion, intended for specialized uses or extreme performance constraints.4(Linear Interpolation): Very lightweight linear resampling (SRC_LINEAR).
Practical Usage Example
To convert a 44.1 kHz audio file to 48 kHz using the highest-quality
resampling algorithm, specify the target format with -f
alongside the -z:src argument:
ecasound -z:src,0 -i:source_44k.wav -f:s16_le,2,48000 -o:output_48k.wavIf the -z:src option is omitted, Ecasound falls back to
its internal linear conversion routine or default library configuration,
which requires minimal processing power but may introduce audible
aliasing artifacts.