I want to make an application that reads the audio samples one by one manipulate them and than writing the new samples to a WAV file. However, when I tried to do this I only received white noise.
I tried to find whether the problem was with the manipulation or with the reading so I tried to simply extract data and rewrite to WAV (without changing the data) and I received a lot of white noise in addition to the original sound.
Can anyone tell me what I'm doing wrong?
FileStream fs = new FileStream(@path, FileMode.Open, FileAccess.Read);
byte[] arrfile = new byte[fs.Length - 44];
fs.Position = 44;
fs.Read(arrfile, 0, arrfile.Length);
fs.Close();
FileStream fo = new FileStream(@outfile, FileMode.Append, FileAccess.Write);
BinaryWriter bw = new BinaryWriter(fo);
bw.Write(arrfile);
bw.Close();
fo.Close();