コード例 #1
0
        public List <byte> GetRawData()
        {
            List <byte> ret = new List <byte>();
            int         num = 0;
            int         cnt = 0;

            while (cnt < dicFile.Count && num < 65536)
            {
                if (dicFile.ContainsKey(num))
                {
                    PCMFileInfo o = dicFile[num];
                    if (o.encData != null)
                    {
                        foreach (byte d in o.encData)
                        {
                            ret.Add(d);
                        }
                    }
                    else if (o.raw != null)
                    {
                        foreach (byte d in o.raw)
                        {
                            ret.Add(d);
                        }
                    }

                    cnt++;
                }
                num++;
            }

            return(ret);
        }
コード例 #2
0
        public void Add(string lin)
        {
            if (string.IsNullOrEmpty(lin))
            {
                return;
            }
            if (lin.Length < 3)
            {
                return;
            }

            List <string> itemList = AnalyzeLine(lin);
            PCMFileInfo   fi       = new PCMFileInfo(itemList, appendFileReaderCallback);

            if (dicFile.ContainsKey(fi.number - 1))
            {
                dicFile.Remove(fi.number - 1);
            }
            dicFile.Add(fi.number - 1, fi);
            if (fi.length > -1)
            {
                fi.Encode(config.FormatType);
            }
        }