Example #1
0
        /// <summary>
        /// Generate a new <see cref="ClearMixBufferCommand"/>.
        /// </summary>
        /// <param name="nodeId">The node id associated to this command.</param>
        public void GenerateClearMixBuffer(int nodeId)
        {
            ClearMixBufferCommand command = new ClearMixBufferCommand(nodeId);

            command.EstimatedProcessingTime = _commandProcessingTimeEstimator.Estimate(command);

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

            float costPerBuffer = 440.68f;
            float baseCost      = 0;

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

            return((uint)(baseCost + costPerBuffer * _bufferCount));
        }
Example #3
0
        public uint Estimate(ClearMixBufferCommand command)
        {
            Debug.Assert(_sampleCount == 160 || _sampleCount == 240);

            float costPerBuffer = 668.8f;
            float baseCost      = 193.2f;

            if (_sampleCount == 160)
            {
                costPerBuffer = 260.4f;
                baseCost      = 139.65f;
            }

            return((uint)(baseCost + costPerBuffer * _bufferCount));
        }
Example #4
0
 public uint Estimate(ClearMixBufferCommand command)
 {
     return((uint)(_sampleCount * 0.83f * _bufferCount * 1.2f));
 }