Fix function to fill the needed header fields, for valid wav file.