Concatenating or mixing audio files

Purpose. This program reads multiple audio files and writes a single one either containing the data of all the other files in order (concatenation mode, option -c) or containing a mixdown of all the other files (mixing mode, option -m or option -f). For concatenation, the input files must have the same audio format. They need not have the same file type.

Usage. 

java AudioConcat -h

java AudioConcat [ -D ] [ -c ] | [ -m ] | [ -f ] -o outputfile inputfile ...

Parameters. 

-c

selects concatenation mode

-m

selects mixing mode

-f

selects float mixing mode

-o outputfile

The filename of the output file

inputfile

the name(s) of input file(s)

Bugs, limitations.  This program is not well-tested. Output is always a WAV file. Future versions should be able to convert different audio formats to a dedicated target format.

Source code.  AudioConcat.java, SequenceAudioInputStream.java, MixingAudioInputStream.java, MixingFloatAudioInputStream.java, gnu.getopt.Getopt