[asterisk-users] sound file length
John Marvin
jm-asterisk at themarvins.org
Thu Sep 21 22:24:39 MST 2006
Race Vanderdecken wrote:
> If it is a wav file you can take the size of the file in bytes and
> subtract 44.
>
This is a hot button of mine. This is a heuristic that may work for many
wav files, but is not true for others. A wav file header can be larger
than 44 bytes, the wav data doesn't have to start right after the
header, and many wav files contain meta data after the wav file data
(and techically meta data could come before the audio data, but I've
never seen that before). Some very poorly written wav file playing
programs will play right through that meta data as if it was audio data.
John
More information about the asterisk-users
mailing list