Beispiel #1
0
            /// <summary>
            ///
            /// </summary>
            /// <param name="parentModule"></param>
            /// <param name="noteOnEvent"></param>
            /// <param name="programNumber"></param>
            /// <param name="slot"></param>
            public GbSound(GB_APU parentModule, GBSoundManager manager, TimbreBase timbre, int tindex, TaggedNoteOnEvent noteOnEvent, int slot) : base(parentModule, manager, timbre, tindex, noteOnEvent, slot)
            {
                this.parentModule = parentModule;
                this.timbre       = (GBAPUTimbre)timbre;

                lastSoundType = this.timbre.SoundType;
                if (lastSoundType == SoundType.PSG && this.timbre.PartialReserveSPSG)
                {
                    partialReserveSpsg = 1;
                }
            }
Beispiel #2
0
        /// <summary>
        ///
        /// </summary>
        public GB_APU(uint unitNumber) : base(unitNumber)
        {
            GainLeft  = DEFAULT_GAIN;
            GainRight = DEFAULT_GAIN;

            Timbres = new GBAPUTimbre[InstrumentBase.DEFAULT_MAX_TIMBRES];
            for (int i = 0; i < InstrumentBase.DEFAULT_MAX_TIMBRES; i++)
            {
                Timbres[i] = new GBAPUTimbre();
            }
            setPresetInstruments();

            this.soundManager = new GBSoundManager(this);
        }