/// <summary> /// Writing Data to specific TagStream /// </summary> protected override void OnWritingData(int MinorVersion) { if (ID3v2.AutoTextEncoding) { SetEncoding(); } TStream.FS.WriteByte((byte)TextEncoding); // Write Text Encoding Language.Write(TStream.FS); // Write Language TStream.FS.WriteByte((byte)_TimeStamp); TStream.FS.WriteByte((byte)_ContentType); TStream.WriteText(Text, TextEncoding, true); _Syllables.Sort(); // Sort Syllables byte[] Buf; foreach (Syllable sb in _Syllables) { TStream.WriteText(sb.Text, TextEncoding, true); Buf = BitConverter.GetBytes(sb.Time); Array.Reverse(Buf); TStream.FS.Write(Buf, 0, 4); } }
/// <summary> /// Writing Data to specific TagStream /// </summary> /// <param name="wr">TagStream to write data</param> /// <param name="MinorVersion">ID3 minor version</param> protected override void OnWritingData(int MinorVersion) { byte[] Buf; TStream.FS.WriteByte((byte)_TimeStamp); _TempoCodes.Sort(); foreach (TempoCode TC in _TempoCodes.ToArray()) { Buf = TC.Data(); TStream.FS.Write(Buf, 0, Buf.Length); } }
/// <summary> /// Writing Data to specific TagStream /// </summary> protected override void OnWritingData(int MinorVersion) { _Events.Sort(); byte[] Buf; TStream.FS.WriteByte((byte)_TimeStamp); foreach (EventCode EC in _Events.ToArray()) { TStream.FS.WriteByte((byte)EC.EventType); Buf = BitConverter.GetBytes(EC.Time); Array.Reverse(Buf); TStream.FS.Write(Buf, 0, Buf.Length); } }