コード例 #1
0
        /// <summary>
        /// Computes the next machine frame, updating contents of the provided <see cref="FrameBuffer"/>.
        /// </summary>
        /// <param name="frameBuffer">The framebuffer to contain the computed output.</param>
        /// <exception cref="ArgumentNullException"></exception>
        /// <exception cref="ArgumentException">frameBuffer is incompatible with machine.</exception>
        public virtual void ComputeNextFrame(FrameBuffer frameBuffer)
        {
            if (MachineHalt)
            {
                return;
            }

            InputState.CaptureInputState();

            _FrameBuffer = frameBuffer;
            FrameNumber++;

            for (var i = 0; i < _FrameBuffer.SoundBufferByteLength; i++)
            {
                _FrameBuffer.SoundBuffer[i] = 0;
            }
        }