Thanks for the pointer to ffmpeg!
I tried a round-trip encode/decode using ffmpeg + alac-decoder and got back a .wav file of exactly the same length as the original one, but different contents. The diffs start at byte 5, so I suspect the headers differ, maybe because I need some decode options to make the same kind of .wav file (?). However the 'file' command says they are the same format.
Does anyone see why this test fails?
+ ffmpeg -i original.wav -acodec alac new.m4a
+ alac-decoder -f recreated.wav new.m4a
+ file original.wav recreated.wav new.m4a
original.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz
recreated.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz
new.m4a: ISO Media, MPEG v4 system, iTunes AAC-LC
+ ls -l original.wav recreated.wav new.m4a
-rw-r--r-- 1 jima jima 91673948 2009-11-06 17:49 original.wav
-rw-r--r-- 1 jima jima 91673948 2009-12-29 00:25 recreated.wav
-rw-r--r-- 1 jima jima 60855313 2009-12-29 00:25 new.m4a
+ cmp original.wav recreated.wav
original.wav recreated.wav differ: byte 5, line 1