/// <summary> /// Generates a WAV file with the given <paramref name="Data"/> and params. /// </summary> /// <param name="Data">The raw sample Data.</param> /// <param name="SampleRate">The SampleRate in Hz.</param> /// <param name="BitsPerSample">The number of Bits per Sample.</param> /// <param name="NrChannel">The number of Channels.</param> public WAV(byte[] Data, UInt32 SampleRate, UInt16 BitsPerSample, UInt16 NrChannel) { Header = new RIFFHeader((uint)(4 + 8 + 16 + 8 + Data.Length + 8)); Wave = new WaveData(Data, SampleRate, BitsPerSample, NrChannel); }