Пример #1
0
        public override void Synth(SectorSynthJob job)
        {
            //read the sector user data
            if ((job.Parts & ESectorSynthPart.User2048) != 0)
            {
                Blob.Read(BlobOffset, job.DestBuffer2448, job.DestOffset + 16, 2048);
            }

            if ((job.Parts & ESectorSynthPart.Header16) != 0)
            {
                SynthUtils.SectorHeader(job.DestBuffer2448, job.DestOffset + 0, job.LBA, 1);
            }

            if ((job.Parts & ESectorSynthPart.ECMAny) != 0)
            {
                SynthUtils.ECM_Mode1(job.DestBuffer2448, job.DestOffset + 0, job.LBA);
            }

            SynthSubchannelAsNeed(job);
        }
Пример #2
0
        public override void Synth(SectorSynthJob job)
        {
            //this isn't fully analyzed/optimized
            Array.Clear(job.DestBuffer2448, job.DestOffset, 2352);

            byte mode = 255;
            int  form = -1;

            switch (TrackType)
            {
            case CueTrackType.Audio:
                mode = 0;
                break;

            case CueTrackType.CDI_2352:
            case CueTrackType.Mode1_2352:
                mode = 1;
                break;

            case CueTrackType.Mode2_2352:
                mode = 2;
                if (Policy.CUE_PregapMode2_As_XA_Form2)
                {
                    job.DestBuffer2448[job.DestOffset + 12 + 6]  = 0x20;
                    job.DestBuffer2448[job.DestOffset + 12 + 10] = 0x20;
                }
                form = 2;                         //no other choice right now really
                break;

            case CueTrackType.Mode1_2048:
                mode  = 1;
                Pause = true;
                break;

            case CueTrackType.Mode2_2336:
            default:
                throw new InvalidOperationException("Not supported: " + TrackType);
            }

            //audio has no sector header but the others do
            if (mode != 0)
            {
                if ((job.Parts & ESectorSynthPart.Header16) != 0)
                {
                    SynthUtils.SectorHeader(job.DestBuffer2448, job.DestOffset + 0, job.LBA, mode);
                }
            }

            if (mode == 1)
            {
                if ((job.Parts & ESectorSynthPart.ECMAny) != 0)
                {
                    SynthUtils.ECM_Mode1(job.DestBuffer2448, job.DestOffset + 0, job.LBA);
                }
            }
            if (mode == 2 && form == 2)
            {
                SynthUtils.EDC_Mode2_Form2(job.DestBuffer2448, job.DestOffset);
            }

            SynthSubchannelAsNeed(job);
        }