Exemplo n.º 1
0
 public CompileManager(Action <string> disp, mucomManager mucom, PMDManager pmd, MoonDriverManager moonDriver)
 {
     this.disp       = disp;
     this.mucom      = mucom;
     this.pmd        = pmd;
     this.moonDriver = moonDriver;
 }
Exemplo n.º 2
0
        public bool init(MmlDatum[] mdrBuf
                         , string mdrWorkPath
                         , MoonDriverManager moonDriverManager
                         , ChipRegister chipRegister
                         , EnmChip[] enmChips
                         , uint v1, uint v2
                         , string mdrFileName)
        {
            if (moonDriverManager == null)
            {
                return(false);
            }

            this.vgmBuf       = null;
            this.mdrBuf       = mdrBuf;
            this.chipRegister = chipRegister;
            //this.useChip = useChip;
            //this.latency = latency;
            //this.waitTime = waitTime;
            this.MoonDriverManager = moonDriverManager;
            chipYMF278B            = chipRegister.YMF278B[0];
            filename = mdrFileName;

            Counter         = 0;
            TotalCounter    = 0;
            LoopCounter     = 0;
            vgmCurLoop      = 0;
            Stopped         = false;
            vgmFrameCounter = -latency - waitTime;
            vgmSpeed        = 1;
            vgmSpeedCounter = 0;

            initPhase = true;
            pcmdata   = new List <SoundManager.PackData>();


            //Driverの初期化
            moonDriverManager.InitDriver(
                System.IO.Path.Combine(mdrWorkPath, "dummy")
                , OPL4InitialWrite
                , OPL4WaitSend
                , mdrBuf
                , chipRegister
                );

            moonDriverManager.StartRendering((int)Common.SampleRate, (int)YMF278BClockValue);
            moonDriverManager.MSTART(0);

            return(true);
        }