private void CreateCommChunk() { this.writer.Write(Encoding.UTF8.GetBytes("COMM")); this.writer.Write(this.SwapEndian(18)); this.writer.Write(this.SwapEndian((short)this.format.Channels)); this.commSampleCountPos = this.outStream.Position; this.writer.Write(0); this.writer.Write(this.SwapEndian((short)this.format.BitsPerSample)); this.writer.Write(IEEE.ConvertToIeeeExtended((double)this.format.SampleRate)); }
private void CreateCommChunk() { this.writer.Write(System.Text.Encoding.UTF8.GetBytes("COMM")); this.writer.Write(SwapEndian((int)18)); this.writer.Write(SwapEndian((short)format.Channels)); commSampleCountPos = this.outStream.Position;; this.writer.Write((int)0); // placeholder for total number of samples this.writer.Write(SwapEndian((short)format.BitsPerSample)); this.writer.Write(IEEE.ConvertToIeeeExtended(format.SampleRate)); }