Ejemplo n.º 1
0
        public static Disc FromCuePath(string cuePath, CueBinPrefs prefs)
        {
            var ret = new Disc();

            ret.FromCuePathInternal(cuePath, prefs);

            ret.Structure.Synthesize_TOCPointsFromSessions();
            ret.Synthesize_SubcodeFromStructure();
            ret.Synthesize_TOCRawFromStructure();

            //try loading SBI. make sure its done after the subcode is synthesized!
            string sbiPath = Path.ChangeExtension(cuePath, "sbi");

            if (File.Exists(sbiPath) && SBI_Format.QuickCheckISSBI(sbiPath))
            {
                var sbi = new SBI_Format().LoadSBIPath(sbiPath);
                ret.ApplySBI(sbi);
            }

            return(ret);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// applies an SBI file to the disc
        /// </summary>
        public void ApplySBI(SBI_Format.SBIFile sbi)
        {
            //save this, it's small, and we'll want it for disc processing a/b checks
            Memos["sbi"] = sbi;

            int n = sbi.ABAs.Count;
            byte[] subcode = new byte[96];
            int b=0;
            for (int i = 0; i < n; i++)
            {
                int aba = sbi.ABAs[i];
                var oldSubcode = this.Sectors[aba].SubcodeSector;
                oldSubcode.ReadSubcodeDeinterleaved(subcode, 0);
                for (int j = 0; j < 12; j++)
                {
                    short patch = sbi.subq[b++];
                    if (patch == -1) continue;
                    else subcode[12 + j] = (byte)patch;
                }
                var bss = new BufferedSubcodeSector();
                Sectors[aba].SubcodeSector = BufferedSubcodeSector.CloneFromBytesDeinterleaved(subcode);
            }
        }
Ejemplo n.º 3
0
        public static Disc FromCuePath(string cuePath, CueBinPrefs prefs)
        {
            var ret = new Disc();
            ret.FromCuePathInternal(cuePath, prefs);

            ret.Structure.Synthesize_TOCPointsFromSessions();
            ret.Synthesize_SubcodeFromStructure();
            ret.Synthesize_TOCRawFromStructure();

            //try loading SBI. make sure its done after the subcode is synthesized!
            string sbiPath = Path.ChangeExtension(cuePath, "sbi");
            if (File.Exists(sbiPath) && SBI_Format.QuickCheckISSBI(sbiPath))
            {
                var sbi = new SBI_Format().LoadSBIPath(sbiPath);
                ret.ApplySBI(sbi);
            }

            return ret;
        }