Blog Archive

Sunday, July 31, 2011

How to compute wave file length and sample number

Microsoft WAVE soundfile format


How to compute SampleNumber according to FileSize(byte)
SampleNumber=(FileSize-44)/(NBITS/8)
WaveLength=SampleNumber/SamplingFrequency

NOTE:
NBITS:
the number of bits per sample (NBITS) used to encode the
data in the file, which can be get via MATLAB command: wavread

No comments:

Post a Comment