public override void Import(RawFrame rawFrame, int codePage)
        {
            ImportRawFrameHeader(rawFrame);

            using (var reader = new FrameDataReader(rawFrame.Payload))
            {
                var encodingByte = reader.ReadByte();
                Language = reader.ReadFixedString(Encoding.ASCII, 3);
                TextEncoding = reader.ReadEncoding(encodingByte, codePage);
                ContentDescriptor = reader.ReadVariableString(TextEncoding);
                Lyrics = reader.ReadVariableString(TextEncoding);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Import the raw frame.
        /// </summary>
        /// <param name="rawFrame">the raw frame.</param>
        /// <param name="codePage">Default code page for Ansi encoding. Pass 0 to use default system encoding code page.</param>
        public override void Import(RawFrame rawFrame, int codePage)
        {
            ImportRawFrameHeader(rawFrame);

            /*
				ID = "COMM"
				TextEncoding    xx
				Language        xx xx xx
				Short Content   (xx xx ... xx) (00 / 00 00)
				Text            (xx xx ... xx)
            */

            using (var reader = new FrameDataReader(rawFrame.Payload))
            {
                byte encodingByte = reader.ReadByte();
                Language = reader.ReadFixedString(Encoding.ASCII, 3);
                TextEncoding = reader.ReadEncoding(encodingByte, codePage);
                ContentDescriptor = reader.ReadVariableString(TextEncoding);
                Text = reader.ReadVariableString(TextEncoding);
            }
        }