public int WriteWAVEToStream(Stream output) { WriteWAVEHeader(output, Rate, SoundData.Length); output.Write(SoundData, 0, SoundData.Length); output.Flush(); return 44+SoundData.Length; }