Motohiro Takayama

Apr 17 '11

How to calculate the duration of a wave file

Parse the wave file header, then simply

duration = subchunk2Zize / byteRate

would work.

see: WAVE PCM soundfile format