Skip to main content

WaveCRC

WaveCRC (inCRC, waveName [,checkHeader])

The WaveCRC function returns a 32-bit cyclic redundancy check value of the bytes in the named wave starting with inCRC.

Pass 0 for inCRC the first time you call WaveCRC for a particular stream of bytes as represented by the wave data.

Pass the last-returned value from WaveCRC for inCRC if you are creating a CRC value for a given stream of bytes through multiple calls to WaveCRC.

waveName may be a numeric or text wave.

checkHeader is optional. If present, its value determines how much of the wave is checked:

checkHeaderWhat It Does
0Check only the wave data (default).
1Check only the internal binary header.
2Check both.

Details

Polynomial used is:

x32 + x26 + x23 + x22 + x16 + x12 + x11 + x10 + x8 + x7 + x5 + x4 + x2 + x + 1

See crc32.c in the public domain source code for zlib for more information.

See Also

StringCRC, Hash, WaveHash, WaveModCount