It would certainly appear to be an endian issue. I have no idea what the port consists of, but the standard code does not appear to be endian safe. Have you tried compressing and decompressing a wave file of your own?
[a href="index.php?act=findpost&pid=373393"][{POST_SNAPBACK}][/a]
ismael@donkee ~ $ mac Test.wav Test.ape -c2000
--- Monkey's Audio Console Front End (v 3.99) (c) Matthew T. Ashland ---
Compressing (normal)...
Progress: 100.0% (0.0 seconds remaining, 2.6 seconds total)
Success...
ismael@donkee ~ $ mac Test.ape Test_deco.wav -d
--- Monkey's Audio Console Front End (v 3.99) (c) Matthew T. Ashland ---
Decompressing...
Progress: 100.0% (0.0 seconds remaining, 2.5 seconds total)
Success...
ismael@donkee ~ $ aplay Test_deco.wav
Playing WAVE 'Test_deco.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
ismael@donkee ~ $ sox Test_deco.wav -r 44100 -c 2 -s -w Test_deco2.wav
ismael@donkee ~ $ aplay Test_deco2.wav
Playing WAVE 'Test_deco2.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
So this test is OK. Does this confirm the endian issue? Should I assume that I will be unable to decompress properly APE files compressed on win32?