Exemplo n.º 1
0
        protected void SynthSubchannelAsNeed(SectorSynthJob job)
        {
            //synth P if needed
            if ((job.Parts & ESectorSynthPart.SubchannelP) != 0)
            {
                SynthUtils.SubP(job.DestBuffer2448, job.DestOffset + 2352, Pause);
            }

            //synth Q if needed
            //TODO - why not already have it serialized? Into a disc resource, even.
            if ((job.Parts & ESectorSynthPart.SubchannelQ) != 0)
            {
                SynthUtils.SubQ_Serialize(job.DestBuffer2448, job.DestOffset + 2352 + 12, ref sq);
            }

            //clear R-W if needed
            if ((job.Parts & ESectorSynthPart.Subchannel_RSTUVW) != 0)
            {
                Array.Clear(job.DestBuffer2448, job.DestOffset + 2352 + 12 + 12, (12 * 6));
            }

            //subcode has been generated deinterleaved; we may still need to interleave it
            if ((job.Parts & ESectorSynthPart.SubcodeAny) != 0)
            {
                if ((job.Parts & (ESectorSynthPart.SubcodeDeinterleave)) == 0)
                {
                    SynthUtils.InterleaveSubcodeInplace(job.DestBuffer2448, job.DestOffset + 2352);
                }
            }
        }
Exemplo n.º 2
0
            public void Synth(SectorSynthJob job)
            {
                //CCD is always containing everything we'd need (unless a .sub is missing?) so don't worry about flags
                var imgBlob = job.Disc.DisposableResources[0] as IBlob;
                var subBlob = job.Disc.DisposableResources[1] as IBlob;

                //Read_2442(job.LBA, job.DestBuffer2448, job.DestOffset);

                //read the IMG data if needed
                if ((job.Parts & ESectorSynthPart.UserAny) != 0)
                {
                    long ofs = job.LBA * 2352;
                    imgBlob.Read(ofs, job.DestBuffer2448, 0, 2352);
                }

                //if subcode is needed, read it
                if ((job.Parts & (ESectorSynthPart.SubcodeAny)) != 0)
                {
                    long ofs = job.LBA * 96;
                    subBlob.Read(ofs, job.DestBuffer2448, 2352, 96);

                    //subcode comes to us deinterleved; we may still need to interleave it
                    if ((job.Parts & (ESectorSynthPart.SubcodeDeinterleave)) == 0)
                    {
                        SynthUtils.InterleaveSubcodeInplace(job.DestBuffer2448, job.DestOffset + 2352);
                    }
                }
            }