Don't forget, that a WAVE file is a simple RIFF container and you'll need to know the exact codec which was used to encode the WAV-file. Assuming you chose a RIFF WAVE with simple PCM codec, which you should identify using the file header of your WAVE file, you have to know the sample rate, the channels used and as already mentioned the resolution of your WAVE. All this information could be got from the WAVE file header. I assume that you're having a 16Bit WAVE file and read shorts (8-Bits) so you're doing your modifications or whatever to the low and high bytes which is probably in most cases a very bad idea. There is a lot of information regarding the WAVE file format. Use google to find it.
Possibly
this could be a good start.