title: Remove the headers from several WAV files, and then concatenate the remaining data into one RAW file
body: <p>I have a RAW audio file which is made up of several concatenated, smaller WAV files. I can open and play this file as 48,000, 8 bit PCM, signed, mono, in Sound Forge.</p>
  
  <p>What I would like to do, in C#, is programmatically overwrite each individual WAV within the file with new data of equal or smaller length, which I think I'm fairly close to being able to do. I can do a File.ReadAllBytes on the RAW file, loop through the byte array, and determine the start and end location of each WAV. I then pick the new WAV files on my PC, remove the headers, and write the remaining data into my RAW file. If the new WAV is smaller than it's destination, I pad out the difference with 0's.</p>
  
  <p>However when I open the new file in Sound Forge at the settings mentioned above, all of my WAVs look more like solid blocks, than the normal "christmas tree" shape, and they all play loud and distorted. After experiencing this for the first time, it dawned on me that all of my new source WAVs were in 41,000, 16 bit PCM, signed, stereo format. I opened my newly created RAW file in this format, and it looks and plays fine.</p>
  
  <p>I figured I must need to convert all of my new WAVs to 48,000, 8 bit PCM, signed, mono, first, then run the application to copy them into the RAW file. I wrote some code using NAudio to do the conversion on the files before copying the data into my RAW file, and I'm still left with the same problem. I also tried converting each of my new WAVs manually in Sound Forge first, and still have the same problem.</p>
  
  <p>What am I missing here? Thanks.</p>