Ejemplo n.º 1
0
        public ByteVector Render()
        {
            ByteVector vector = new ByteVector();

            // add the file identifier -- "3DI"
            vector.Add(FileIdentifier);

            // add the version number -- we always render a 2.4.0 tag regardless of what
            // the tag originally was.
            vector.Add((byte)4);
            vector.Add((byte)0);

            // render and add the flags
            byte flags = 0;

            if (Desynchronization)
            {
                flags |= 128;
            }
            if (ExtendedHeader)
            {
                flags |= 64;
            }
            if (ExperimentalIndicator)
            {
                flags |= 32;
            }
            flags |= 16;
            vector.Add(flags);

            // add the size
            vector.Add(Id3v2SynchData.FromUInt(TagSize));

            return(vector);
        }
Ejemplo n.º 2
0
        public ByteVector Render()
        {
            ByteVector flags = new ByteVector(2, (byte)0);             // just blank for the moment

            return(frameId + Id3v2SynchData.FromUInt(frameSize) + flags);
        }