Esempio n. 1
0
        /// <summary>
        /// Generate a new <see cref="DepopForMixBuffersCommand"/>.
        /// </summary>
        /// <param name="depopBuffer">The depop buffer.</param>
        /// <param name="bufferOffset">The target buffer offset.</param>
        /// <param name="bufferCount">The buffer count.</param>
        /// <param name="nodeId">The node id associated to this command.</param>
        /// <param name="sampleRate">The target sample rate in use.</param>
        public void GenerateDepopForMixBuffersCommand(Memory <float> depopBuffer, uint bufferOffset, uint bufferCount, int nodeId, uint sampleRate)
        {
            DepopForMixBuffersCommand command = new DepopForMixBuffersCommand(depopBuffer, bufferOffset, bufferCount, nodeId, sampleRate);

            command.EstimatedProcessingTime = _commandProcessingTimeEstimator.Estimate(command);

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

            if (_sampleCount == 160)
            {
                return((uint)739.64f);
            }

            return((uint)910.97f);
        }
Esempio n. 3
0
 public uint Estimate(DepopForMixBuffersCommand command)
 {
     return((uint)(_sampleCount * 8.9f * command.MixBufferCount));
 }