I'm trying to calculate the number of samples in a wave file. I use the formula:
Subchunk2Size = NumSamples * NumChannels * BitsPerSample/8
Using the formula above, I get a different values than what's reported in Audacity and other standard Wave Editors. I scanned the headers for all the required information, but the formula only works for some files.
Audio files: audio file 1 Audio File 2