public FormatChunk(WaveFormat format) : base("fmt ") { WaveInfo = new WaveInfo() { FormatTag = format }; if (format == WaveFormat.Extensible) { FormatInfo = new ExtensibleInfo(); } else { FormatInfo = new PCMInfo(); } }
internal FormatChunk(EndianBinaryReader reader) : base("fmt ", reader) { long endOffset = GetEndOffset(reader); WaveInfo = new WaveInfo(reader); if (WaveInfo.FormatTag == WaveFormat.Extensible) { FormatInfo = new ExtensibleInfo(reader); } else { FormatInfo = new PCMInfo(reader); } EatRemainingBytes(reader, endOffset); }
internal override void Write(EndianBinaryWriter writer) { base.Write(writer); WaveInfo.Write(writer); FormatInfo.Write(writer); }