Esempio 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;
 }
Esempio n. 2
0
        public bool init(MmlDatum[] mBuf
                         , string mWorkPath
                         , PMDManager pmdManager
                         , ChipRegister chipRegister
                         , EnmChip[] enmChips
                         , uint v1, uint v2
                         , string mFileName
                         , bool isGIMICOPNA)
        {
            if (pmdManager == null)
            {
                return(false);
            }

            this.vgmBuf       = null;
            this.mBuf         = mBuf;
            this.chipRegister = chipRegister;
            //this.useChip = useChip;
            //this.latency = latency;
            //this.waitTime = waitTime;
            this.pm    = pmdManager;
            chipYM2608 = chipRegister.YM2608[0];
            chipPPZ8   = chipRegister.PPZ8[0];
            chipPPSDRV = chipRegister.PPSDRV[0];
            chipP86    = chipRegister.P86[0];
            filename   = mFileName;

            Counter             = 0;
            TotalCounter        = 0;
            LoopCounter         = 0;
            vgmCurLoop          = 0;
            Stopped             = false;
            vgmFrameCounter     = -latency - waitTime;
            vgmSpeed            = 1;
            vgmSpeedCounter     = 0;
            YM2608_FMVolume     = 0;
            YM2608_SSGVolume    = 0;
            YM2608_RhythmVolume = 0;
            YM2608_AdpcmVolume  = 0;
            GIMIC_SSGVolume     = 0;

            initPhase = true;
            pd        = new List <SoundManager.PackData>();
            psd       = new List <SoundManager.PackData>();
            pzd       = new List <SoundManager.PackData>();
            p8d       = new List <SoundManager.PackData>();

            //Driverの初期化
            pm.InitDriver(
                System.IO.Path.Combine(mWorkPath, "dummy")
                , OPNAInitialWrite
                , OPNAWaitSend
                , PPZ8Write
                , PPSDRVWrite
                , P86Write
                , false
                , mBuf
                , true
                , false
                , chipRegister
                , isGIMICOPNA
                );

            YM2608_FMVolume     = pm.YM2608_FMVolume;
            YM2608_SSGVolume    = pm.YM2608_SSGVolume;
            YM2608_RhythmVolume = pm.YM2608_RhythmVolume;
            YM2608_AdpcmVolume  = pm.YM2608_AdpcmVolume;
            GIMIC_SSGVolume     = pm.GIMIC_SSGVolume;

            if (!Audio.setting.pmdDotNET.isAuto && Audio.setting.pmdDotNET.setManualVolume)
            {
                YM2608_FMVolume     = Audio.setting.pmdDotNET.volumeFM;
                YM2608_SSGVolume    = Audio.setting.pmdDotNET.volumeSSG;
                YM2608_RhythmVolume = Audio.setting.pmdDotNET.volumeRhythm;
                YM2608_AdpcmVolume  = Audio.setting.pmdDotNET.volumeAdpcm;
                GIMIC_SSGVolume     = Audio.setting.pmdDotNET.volumeGIMICSSG;
            }


            pm.StartRendering((int)Common.SampleRate, (int)YM2608ClockValue);
            pm.MSTART(0);

            return(true);
        }