NScumm.Core.Audio.SoftSynth.TownsMidiInputChannel.Allocate C# (CSharp) Method

Allocate() public method

public Allocate ( ) : bool
return bool
        public bool Allocate()
        {
            if (_allocated)
                return false;
            _allocated = true;
            return true;
        }

Usage Example

Example #1
0
        public override MidiChannel AllocateChannel()
        {
            if (!_isOpen)
            {
                return(null);
            }

            for (int i = 0; i < 32; ++i)
            {
                TownsMidiInputChannel chan = _channels[i];
                if (chan.Allocate())
                {
                    return(chan);
                }
            }

            return(null);
        }