Example #1
0
        public override uint Start(byte ChipID, uint sampleRate, uint ClockValue, params object[] option)
        {
            if (ChipID > 1)
            {
                return(0);
            }

            x68sound[ChipID]   = new NX68Sound.X68Sound();
            sound_Iocs[ChipID] = new NX68Sound.sound_iocs(x68sound[ChipID]);

            if (option != null)
            {
                if (option.Length > 0 && option[0] != null)
                {
                    opmflag = (int)option[0];
                }
                if (option.Length > 1 && option[1] != null)
                {
                    adpcmflag = (int)option[1];
                }
                if (option.Length > 2 && option[2] != null)
                {
                    pcmbuf = (int)option[2];
                }
            }

            x68sound[ChipID].X68Sound_StartPcm((int)sampleRate, opmflag, adpcmflag, pcmbuf);
            x68sound[ChipID].X68Sound_OpmClock((int)ClockValue);

            return(sampleRate);
        }
Example #2
0
 public sound_iocs(X68Sound x68Sound)
 {
     this.x68Sound = x68Sound;
 }