Ecasound Support for Apple AIFF and AIFC Files
Ecasound fully supports reading and writing both Apple AIFF and AIFC
audio files, primarily through its integration with the
libsndfile library. This article outlines how Ecasound
handles these formats, the dependencies required to enable support, and
how to execute standard read and write operations via the command
line.
How Ecasound Handles AIFF and AIFC
Ecasound relies on external audio libraries rather than maintaining separate, internal decoders for every file container. For standard container formats like AIFF (Audio Interchange File Format) and AIFC (AIFF-C, or compressed AIFF), Ecasound utilizes libsndfile or the legacy audiofile library.
Because libsndfile natively supports reading and writing
AIFF and AIFC, Ecasound inherits full compatibility with both formats as
long as it was compiled with libsndfile support enabled
(which is the default on virtually all modern Linux distributions and
package managers).
Reading AIFF and AIFC Files
To read an AIFF or AIFC file, specify it as an input source using the
-i option. Ecasound automatically detects the container
type and audio parameters (such as sample rate, bit depth, and channel
count) from the file header.
Standard AIFF input:
ecasound -i input.aiff -o alsaAIFC input:
ecasound -i input.aifc -o alsa
You can also explicitly specify the sndfile engine if
file extensions are non-standard:
ecasound -i sndfile,input.audio -o alsaWriting AIFF and AIFC Files
To write to an AIFF or AIFC container, define the target with the
-o parameter using the appropriate file extension. Ecasound
instructs the underlying library to construct the proper header
format.
Rendering to AIFF:
ecasound -i input.wav -o output.aiffRendering to AIFC:
ecasound -i input.wav -o output.aifc
If needed, you can define target audio parameters (such as 24-bit
linear PCM, 48 kHz, stereo) using the -f flag prior to
defining the output file:
ecasound -i input.wav -f:s24_be,2,48000 -o output.aiff(Note: Big-endian formats like s16_be or
s24_be represent traditional standard AIFF formatting,
while little-endian formats like s16_le are typically
encapsulated within AIFC via the 'sowt' compression
type).
Compression and Codec Limitations with AIFC
While uncompressed linear PCM in both AIFF and AIFC is universally
supported, AIFC can theoretically contain various compressed streams
(such as GSM, IMA ADPCM, or legacy Apple codecs). Ecasound can only read
or write these streams if the underlying libsndfile binary
supports the specific compression algorithm. Standard PCM,
floating-point formats, A-law, and u-law encodings within AIFC
containers are fully supported.