NScumm.Core.Audio.SoftSynth.EnvelopeGenerator.WriteATTACK_DECAY C# (CSharp) Method

WriteATTACK_DECAY() public method

public WriteATTACK_DECAY ( int attack_decay ) : void
attack_decay int
return void
        public void WriteATTACK_DECAY(int attack_decay)
        {
            attack = (attack_decay >> 4) & 0x0f;
            decay = attack_decay & 0x0f;
            if (state == State.ATTACK)
            {
                rate_period = rate_counter_period[attack];
            }
            else if (state == State.DECAY_SUSTAIN)
            {
                rate_period = rate_counter_period[decay];
            }
        }