示例#1
0
        private void SetupDMG(outDatum od)
        {
            Chip chip = null;

            if (Audio.chipRegister.DMG == null)
            {
                return;
            }
            if (od.linePos.chipIndex < Audio.chipRegister.DMG.Count)
            {
                chip = Audio.chipRegister.DMG[od.linePos.chipNumber];
            }
            if (chip == null && od.linePos.chipIndex >= 0x80)
            {
                Driver.ZGM.ZgmChip.ZgmChip zChip = Audio.chipRegister.dicChipCmdNo[od.linePos.chipIndex];
                chip = Audio.chipRegister.DMG[zChip.Index];
            }
            DMG dmg = new DMG(chip, setting, midiKbd);

            dmg.isTrace = isTrace;

            DMG.Add(dmg);
            dicInstAdd(dmg, od.linePos.chipIndex, od.linePos.chipNumber);
            instsAdd(dmg, od.linePos.chipIndex, od.linePos.chipNumber);
        }
示例#2
0
文件: DMG.cs 项目: kuma4649/mml2vgm
        public static Instrument SetupInstInfo(outDatum od, ref SoundManager.Chip chip, Setting setting, bool isTrace, MIDIKbd midiKbd)
        {
            if (Audio.chipRegister == null || Audio.chipRegister.DMG == null)
            {
                return(null);
            }

            if (od.linePos.chipIndex < Audio.chipRegister.DMG.Count)
            {
                chip = Audio.chipRegister.DMG[od.linePos.chipIndex];
            }

            if (chip == null && od.linePos.chipIndex >= 0x80)
            {
                Driver.ZGM.ZgmChip.ZgmChip zChip = Audio.chipRegister.dicChipCmdNo[od.linePos.chipIndex];
                chip = Audio.chipRegister.DMG[zChip.Index];
            }

            DMG dmg = new DMG(chip, setting, midiKbd);

            dmg.isTrace = isTrace;

            return(dmg);
        }