Esempio n. 1
0
        public RiffUnknown(string aId, UInt32 aSize, AByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            Logger.Debug("Unknown ID:" + aId + ", Size:" + aSize);

            dataArray = aByteArray.ReadBytes(( int )Size);
        }
Esempio n. 2
0
        public RiffChunk Construct(string aId, UInt32 aSize, AByteArray aByteArray, RiffChunkList aParent)
        {
            Type[]   lArgumentTypes = { typeof(string), typeof(UInt32), typeof(AByteArray), typeof(RiffChunkList) };
            object[] lArguments     = { aId, aSize, aByteArray, aParent };

            Type lTypeChunk = typeof(RiffUnknown);

            if (ChunkTypeDictionaryDictionary.ContainsKey(type) == true)
            {
                if (ChunkTypeDictionaryDictionary[type].ContainsKey(aId) == true)
                {
                    lTypeChunk = ChunkTypeDictionaryDictionary[type][aId];
                }
            }

            if (lTypeChunk == typeof(RiffUnknown))
            {
                Logger.Debug("Unknown:" + type + "," + aId);
            }
            else
            {
                Logger.Debug("known:" + type + "," + aId);
            }

            return(( RiffChunk )lTypeChunk.GetConstructor(lArgumentTypes).Invoke(lArguments));
        }
Esempio n. 3
0
        public 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.Error("List is not exist.");
            }
            else if (listListDictionary[aType].Count > 1)
            {
                Logger.Error("List exist more than 1.");
            }

            return(listListDictionary[aType][0]);
        }
Esempio n. 4
0
        public 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]);
        }
Esempio n. 5
0
        public RiffInfoIcrd(string aId, UInt32 aSize, AByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            creationDate = aByteArray.ReadString(( int )Size);

            informationList.Add("Creation Date:" + creationDate);
            Logger.BreakDebug("Creation Date:" + creationDate);
        }
Esempio n. 6
0
        public RiffInfoIcop(string aId, UInt32 aSize, AByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            corporation = aByteArray.ReadString(( int )Size);

            informationList.Add("Corporation:" + corporation);
            Logger.BreakDebug("Corporation:" + corporation);
        }
Esempio n. 7
0
        public RiffInfoIprd(string aId, UInt32 aSize, AByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            product = aByteArray.ReadString(( int )Size);

            informationList.Add("Product:" + product);
            Logger.BreakDebug("Product:" + product);
        }
Esempio n. 8
0
        public RiffInfoIkey(string aId, UInt32 aSize, AByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            keywords = aByteArray.ReadString(( int )Size);

            informationList.Add("Keywords:" + keywords);
            Logger.BreakDebug("Keywords:" + keywords);
        }
Esempio n. 9
0
        public RiffInfoIsng(string aId, UInt32 aSize, AByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            unknown = aByteArray.ReadString(( int )Size);

            informationList.Add("Unknown:" + unknown);
            Logger.BreakDebug("Unknown:" + unknown);
        }
Esempio n. 10
0
        public RiffInfoIgnr(string aId, UInt32 aSize, AByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            genre = aByteArray.ReadString(( int )Size);

            informationList.Add("Genre:" + genre);
            Logger.BreakDebug("Genre:" + genre);
        }
Esempio n. 11
0
        public RiffInfoIsrc(string aId, UInt32 aSize, AByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            source = aByteArray.ReadString(( int )Size);

            informationList.Add("Source:" + source);
            Logger.BreakDebug("Source:" + source);
        }
Esempio n. 12
0
        public RiffInfoItch(string aId, UInt32 aSize, AByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            technician = aByteArray.ReadString(( int )Size);

            informationList.Add("Technician:" + technician);
            Logger.BreakDebug("Technician:" + technician);
        }
Esempio n. 13
0
        public RiffInfoIart(string aId, UInt32 aSize, AByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            artist = aByteArray.ReadString(( int )Size);

            informationList.Add("Artist:" + artist);
            Logger.BreakDebug("Artist:" + artist);
        }
Esempio n. 14
0
        public RiffInfoIeng(string aId, UInt32 aSize, AByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            engineer = aByteArray.ReadString(( int )Size);

            informationList.Add("Engineer:" + engineer);
            Logger.BreakDebug("Engineer:" + engineer);
        }
Esempio n. 15
0
        protected RiffChunk(string aId, UInt32 aSize, AByteArray aByteArray, RiffChunkList aParent)
        {
            id     = aId;
            Size   = aSize;
            parent = aParent;

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

            informationList = new List <string>();

            Monoamp.Boundary.Logger.Debug("Position:" + position.ToString());
        }
Esempio n. 16
0
        protected RiffChunkList(string aId, UInt32 aSize, AByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            chunkList          = new List <RiffChunk>();
            listListDictionary = new Dictionary <string, List <RiffChunkList> >();

            type = aByteArray.ReadString(4);

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

            aByteArray.SetPosition(( int )(position + aSize));
        }