wav_filter: Use the functions from portable_io.h for writing the wav header.