If you are looking for a convenient way to check that the file starts with 'RIFF', there may be a more convenient way for you to find out. Since the ChunkID is 4 bytes long, you may want to store what you expect 'RIFF' in a datatype that is also 4 bytes long (instead of a char array of length 4), then parse the first four bytes as, for example, an int.
I have a wav file that starts with RIFF here, here's what number you get when you interpret the first four bytes as an int.
od -ci -N4 ./test.wav
0000000 R I F F
1179011410
So the option -ci
first prints each byte as its ASCII equivalent (RIFF), and then prints each set of 4 bytes as an integer. So really, 1179011410 = 'RIFF' and the integer may be easier for you to check for.
But as an aside, I'm not really sure why you need to pass 'RIFF' into the ProcessWaveFile() function. If you only ever deal with RIFF files, you might get away with having that information stored in the ProcessWaveFile() function itself.