Ejemplo n.º 1
0
        /// <summary> Fill the header.
        /// </summary>
        public static int FourCC(System.String ChunkName)
        {
            sbyte[] p = new sbyte[] { (sbyte)(0x20), (sbyte)(0x20), (sbyte)(0x20), (sbyte)(0x20) };
            SupportClass.GetSBytesFromString(ChunkName, 0, 4, ref p, 0);
            int ret = (((p[0] << 24) & (int)SupportClass.Identity(0xFF000000)) | ((p[1] << 16) & 0x00FF0000) | ((p[2] << 8) & 0x0000FF00) | (p[3] & 0x000000FF));

            return(ret);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///     Fill the header.
        /// </summary>
        public static int FourCC(string chunkName)
        {
            sbyte[] p = { 0x20, 0x20, 0x20, 0x20 };
            SupportClass.GetSBytesFromString(chunkName, 0, 4, ref p, 0);
            int ret = (((p[0] << 24) & (int)SupportClass.Identity(0xFF000000)) | ((p[1] << 16) & 0x00FF0000) |
                       ((p[2] << 8) & 0x0000FF00) | (p[3] & 0x000000FF));

            return(ret);
        }