NScumm.Core.Audio.SoftSynth.AdlibMidiDriver.AdLibPart.Detune C# (CSharp) Method

Detune() public method

public Detune ( byte value ) : void
value byte
return void
            public override void Detune(byte value)
            {
                // Sam&Max's OPL3 driver uses this for a completly different purpose. It
                // is related to voice allocation. We ignore this for now.
                // TODO: We probably need to look how the interpreter side of Sam&Max's
                // iMuse version handles all this too. Implementing the driver side here
                // would be not that hard.
                #if ENABLE_OPL3
                if (_owner.Opl3Mode) {
                //_maxNotes = value;
                return;
                }
                #endif

                _detuneEff = (sbyte)value;
                for (var voice = _voice; voice != null; voice = voice.Next)
                {
                    _owner.AdlibNoteOn(voice.Channel, voice.Note/* + _transposeEff*/,
                        (_pitchBend * _pitchBendFactor >> 6) + _detuneEff);
                }
            }