What about 'afconvert'? A CoreAudio example application, following Xcode Tools.
afconvert - reads one audio file, writes it to another format. Good example of the power of CAAudioFile and use of the AudioConverter for codecs.
$ afconvert
Usage:
afconvert [option...] input_file [output_file]
Options: (may appear before or after arguments)
{ -f | --file } file_format:
'adts' = AAC ADTS (.aac, .adts)
data_formats: 'aac '
'ac-3' = AC3 (.ac3)
data_formats: 'ac-3'
'AIFC' = AIFC (.aif, .aiff, .aifc)
data_formats: BEI8 BEI16 BEI24 BEI32 BEF32
BEF64 'ulaw' 'alaw' 'MAC3' 'MAC6' 'ima4'
'QDMC' 'QDM2' 'Qclp' 'agsm'
'AIFF' = AIFF (.aif, .aiff)
data_formats: BEI8 BEI16 BEI24 BEI32
'caff' = Apple CAF File (.caf)
data_formats: '.mp3' 'MAC3' 'MAC6' 'QDM2' 'QDMC'
'Qclp' 'Qclq' 'TS\x00\x02' 'TS\x00\x06' 'TS\x00\x07' 'TS\x00\x11'
'TS\x00E' 'TS\x00U' 'WMA1' 'WMA2' 'WMA3' 'aac '
'agsm' 'alac' 'alaw' 'drms' 'dvca' 'dvi '
'ima4' 'lpc ' BEI8 BEI16 BEI24 BEI32
BEF32 BEF64 LEI16 LEI24 LEI32 LEF32
LEF64 'ms\x00\x02' 'ms\x00\x11' 'ms\x001' 'ms\x00U' 'samr'
'ulaw' 'vdva'
'MPG3' = MPEG Layer 3 (.mp3, .mpeg)
data_formats: '.mp3'
'mp4f' = MPEG4 Audio (.mp4)
data_formats: 'aac '
'm4af' = MPEG4 Audio (.m4a)
data_formats: 'aac ' 'alac'
'NeXT' = NeXT/Sun (.snd, .au)
data_formats: BEI8 BEI16 BEI24 BEI32 BEF32
BEF64 'ulaw'
'Sd2f' = Sound Designer II (.sd2)
data_formats: BEI8 BEI16 BEI24 BEI32
'WAVE' = WAVE (.wav)
data_formats: LEUI8 LEI16 LEI24 LEI32 LEF32
LEF64 'ulaw' 'alaw'
{ -d | --data } data_format[@sample_rate_hz][/format_flags][#frames_per_packet] :
[-][BE|LE]{F|[U]I}{8|16|24|32|64} (PCM)
e.g. BEI16 F32@44100
or a data format appropriate to file format, as above
format_flags: hex digits, e.g. '80'
bitdepth on non-PCM formats can be specified, e.g.: alac-24
Frames per packet can be specified for some encoders, e.g.: samr#12
{ -c | --channels } number_of_channels
add/remove channels without regard to order
{ -l | --channellayout } layout_tag
layout_tag: name of a constant from CoreAudioTypes.h
(prefix "kAudioChannelLayoutTag_" may be omitted)
if specified once, applies to output file; if twice, the first
applies to the input file, the second to the output file
{ -b | --bitrate } bit_rate_bps
e.g. 128000
{ -q | --quality } codec_quality
codec_quality: 0-127
{ -r | --src-quality } src_quality
src_quality (sample rate converter quality): 0-127
{ -v | --verbose }
print progress verbosely
{ -s | --strategy } strategy
bitrate strategy for encoded file
0 for CBR, 1 for ABR, 2 for VBR
{ -t | --tag }
If encoding to CAF, store the source file's format and name in a user chunk.
If decoding from CAF, use the destination format and filename found in a user chunk.
--prime-method method
decode priming method (see AudioConverter.h)