Exemplo n.º 1
0
        /// <summary>
        /// Create a new <see cref="CircularBufferSinkCommand"/>.
        /// </summary>
        /// <param name="bufferOffset">The offset of the mix buffer.</param>
        /// <param name="sink">The <see cref="BaseSink"/> of the circular buffer.</param>
        /// <param name="nodeId">The node id associated to this command.</param>
        public void GenerateCircularBuffer(uint bufferOffset, CircularBufferSink sink, int nodeId)
        {
            CircularBufferSinkCommand command = new CircularBufferSinkCommand(bufferOffset, ref sink.Parameter, ref sink.CircularBufferAddressInfo, sink.CurrentWriteOffset, nodeId);

            command.EstimatedProcessingTime = _commandProcessingTimeEstimator.Estimate(command);

            AddCommand(command);
        }
        public uint Estimate(CircularBufferSinkCommand command)
        {
            Debug.Assert(_sampleCount == 160 || _sampleCount == 240);

            float costPerBuffer = 770.26f;
            float baseCost      = 0f;

            if (_sampleCount == 160)
            {
                costPerBuffer = 531.07f;
            }

            return((uint)(baseCost + costPerBuffer * command.InputCount));
        }
Exemplo n.º 3
0
        public uint Estimate(CircularBufferSinkCommand command)
        {
            Debug.Assert(_sampleCount == 160 || _sampleCount == 240);

            float costPerBuffer = 1726.0f;
            float baseCost      = 1369.7f;

            if (_sampleCount == 160)
            {
                costPerBuffer = 853.63f;
                baseCost      = 1284.5f;
            }

            return((uint)(baseCost + costPerBuffer * command.InputCount));
        }
Exemplo n.º 4
0
 public uint Estimate(CircularBufferSinkCommand command)
 {
     return(55);
 }