Data format: 1 ch, 44100 Hz, 'alac' (0x00000001) from 16-bit source, 4096 frames/packet
no channel layout.
$ afinfo ref_pink-iTunes.m4a
File: ref_pink-iTunes.m4a
File type ID: m4af
Data format: 1 ch, 44100 Hz, 'alac' (0x00000001) from 16-bit source, 4096 frames/packet
Channel layout: Mono
estimated duration: 5.016 sec
audio bytes: 340642
audio packets: 54
bit rate: 543341 bits per second
packet size upper bound: 6478
audio data file offset: 4110
optimized
sound check:
sc ave perceived power coeff 374
sc max perceived power coeff 0
sc peak amplitude msec 4039
sc max perceived power msec 555
sc peak amplitude 0
----
and then back to wave using afconvert:
afconvert ref_pink-iTunes.m4a -f WAVE -d LEI16 ref_pink-iTunes.wav
$ afinfo !$
afinfo ref_pink-iTunes.wav
File: ref_pink-iTunes.wav
File type ID: WAVE
Data format: 1 ch, 44100 Hz, 'lpcm' (0x0000000C) 16-bit little-endian signed integer
no channel layout.
estimated duration: 5.000 sec
audio bytes: 441000
audio packets: 220500
bit rate: 705600 bits per second
packet size upper bound: 2
audio data file offset: 4096
optimized
----
The strange thing is that when I open the the intermediate alac files in Audacity, they show up with the correct (220500) frame count, in spite of what is reported by afinfo. It is only when converted back to wave that the data is actually lost.
I can also open the alac files in iTunes, and when converted to wave I get the original wav back with no loss.
Does ExtAudioFile handle the magic cookies automatically? Could this be the source of the problem?
Stephen