Exemplo n.º 1
0
 internal SoundEventQueue(int size)
 {
     _size   = size;
     _events = new SoundEvent[_size];
     // We initialize all the fuckers
     for (int i = 0; i < _size; ++i)
     {
         _events[i] = new SoundEvent();
     }
 }
Exemplo n.º 2
0
 internal SoundEventQueue(int size)
 {
     _size = size;
       _events = new SoundEvent[_size];
       // We initialize all the fuckers
       for (int i = 0; i < _size; ++i)
       {
     _events[i] = new SoundEvent();
       }
 }
Exemplo n.º 3
0
        internal bool GetNextEvent(ref SoundEvent soundEvent)
        {
            if (_readBuffer == _writeBuffer)
            {
                return(false);
            }

            soundEvent.TickDiff = _events[_readBuffer].TickDiff;
            soundEvent.Kind     = _events[_readBuffer].Kind;
            soundEvent.Value    = _events[_readBuffer].Value;
            ++_readBuffer;
            if (_readBuffer == _size)
            {
                _readBuffer = 0;
            }

            return(true);
        }
Exemplo n.º 4
0
        internal bool GetNextEvent(ref SoundEvent soundEvent)
        {
            if (_readBuffer == _writeBuffer) { return false; }

              soundEvent.TickDiff = _events[_readBuffer].TickDiff;
              soundEvent.Kind = _events[_readBuffer].Kind;
              soundEvent.Value = _events[_readBuffer].Value;
              ++_readBuffer;
              if (_readBuffer == _size)
              {
            _readBuffer = 0;
              }

              return true;
        }