Example #1
0
        public RiffChunkIprd(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            product = aByteArray.ReadString(( int )size);

            informationList.Add("Product:" + product);
        }
Example #2
0
        public RiffChunkIsng(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            unknown = aByteArray.ReadString(( int )size);

            informationList.Add("Unknown:" + unknown);
        }
Example #3
0
        public RiffChunkUnknown(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            Logger.LogWarning("Unknown Type");

            dataArray = aByteArray.ReadBytes(( int )size);
        }
Example #4
0
        public RiffChunkInam(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            name = aByteArray.ReadString(( int )size);

            informationList.Add("Name:" + name);
        }
Example #5
0
        public RiffChunkItch(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            technician = aByteArray.ReadString(( int )size);

            informationList.Add("Technician:" + technician);
        }
Example #6
0
        public RiffChunkIkey(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            keywords = aByteArray.ReadString(( int )size);

            informationList.Add("Keywords:" + keywords);
        }
Example #7
0
        public RiffChunkIart(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            artist = aByteArray.ReadString(( int )size);

            informationList.Add("Artist:" + artist);
        }
Example #8
0
        public RiffChunkIeng(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            engineer = aByteArray.ReadString(( int )size);

            informationList.Add("Engineer:" + engineer);
        }
Example #9
0
        public RiffChunkIcmt(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            comment = aByteArray.ReadString(( int )size);

            informationList.Add("Comment:" + comment);
        }
Example #10
0
        public RiffChunk Construct(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
        {
            Type[]   lArgumentTypes = { typeof(string), typeof(UInt32), typeof(ByteArray), typeof(RiffChunkList) };
            object[] lArguments     = { aId, aSize, aByteArray, aParent };

            Type lTypeChunk = typeof(RiffChunkUnknown);

            if (aId == "RIFF" || aId == "LIST")
            {
                type = aByteArray.ReadString(4);

                if (listTypeDictionary.ContainsKey(type) == true)
                {
                    lTypeChunk = listTypeDictionary[type];
                }
                else
                {
                    Logger.LogError("Unknown:" + type);
                }
            }
            else
            {
                if (chunkTypeDictionary.ContainsKey(aId) == true)
                {
                    lTypeChunk = chunkTypeDictionary[aId];
                }
            }

            return(( RiffChunk )lTypeChunk.GetConstructor(lArgumentTypes).Invoke(lArguments));
        }
Example #11
0
        public RiffChunkIsbj(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            subject = aByteArray.ReadString(( int )size);

            informationList.Add("Subject:" + subject);
        }
Example #12
0
        protected RiffChunkList GetChunkList(string aId, string aType)
        {
            if (listListDictionary.ContainsKey(aType) == true)
            {
                return(listListDictionary[aType][0]);
            }

            List <RiffChunkList> lListList = new List <RiffChunkList>();

            for (int i = 0; i < chunkList.Count; i++)
            {
                if (chunkList[i].id == aId)
                {
                    RiffChunkList lRiffList = ( RiffChunkList )chunkList[i];

                    if (lRiffList.type == aType)
                    {
                        lListList.Add(( RiffChunkList )chunkList[i]);
                    }
                }
            }

            listListDictionary.Add(aType, lListList);

            if (listListDictionary[aType].Count < 1)
            {
                Logger.LogErrorBreak("List is not exist.");
            }
            else if (listListDictionary[aType].Count > 1)
            {
                Logger.LogErrorBreak("List exist more than 1.");
            }

            return(listListDictionary[aType][0]);
        }
Example #13
0
        public RiffChunkIgnr(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            genre = aByteArray.ReadString(( int )size);

            informationList.Add("Genre:" + genre);
        }
Example #14
0
        protected List <RiffChunkList> GetChunkListList(string aId, string aType)
        {
            if (listListDictionary.ContainsKey(aType) == true)
            {
                return(listListDictionary[aType]);
            }

            List <RiffChunkList> lListList = new List <RiffChunkList>();

            for (int i = 0; i < chunkList.Count; i++)
            {
                if (chunkList[i].id == aId)
                {
                    RiffChunkList lRiffList = ( RiffChunkList )chunkList[i];

                    if (lRiffList.type == aType)
                    {
                        lListList.Add(( RiffChunkList )chunkList[i]);
                    }
                }
            }

            listListDictionary.Add(aType, lListList);

            return(listListDictionary[aType]);
        }
Example #15
0
        public RiffChunkIsft(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            software = aByteArray.ReadString(( int )size);

            informationList.Add("Software:" + software);
        }
Example #16
0
        public RiffChunkIcrd(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            creationDate = aByteArray.ReadString(( int )size);

            informationList.Add("Creation Date:" + creationDate);
        }
Example #17
0
        protected RiffChunk(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
        {
            id     = aId;
            size   = aSize;
            parent = aParent;

            if (aByteArray != null)
            {
                position = ( UInt32 )aByteArray.Position;
            }

            informationList = new List <string>();
        }
Example #18
0
        protected RiffChunkList(Dictionary <string, Type> aChunkTypeDictionary, Dictionary <string, Type> aBodyTypeDictionary, string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            chunkTypeDictionary = aChunkTypeDictionary;
            listTypeDictionary  = aBodyTypeDictionary;

            chunkList          = new List <RiffChunk>();
            listListDictionary = new Dictionary <string, List <RiffChunkList> >();

            int lStartPosition = aByteArray.Position;

            try {
                while (aByteArray.Position < lStartPosition + aSize - 4)
                {
                    ReadChunk(aByteArray);
                }
            }
            catch (Exception aExpection) {
                Logger.LogError("Expection at RIFF Read:" + aExpection.ToString());
            }

            aByteArray.SetPosition(lStartPosition + ( int )aSize - 4);
        }
Example #19
0
 public RiffFile(ByteArray aByteArray)
     : base(chunkTypeDictionary, bodyTypeDictionary, ID, ( UInt32 )aByteArray.Length, aByteArray, null)
 {
     name          = aByteArray.GetName();
     riffChunkList = ( RiffChunkList )GetChunk("RIFF");
 }