Beispiel #1
0
        /// <summary>
        /// Create a new <see cref="UpsampleCommand"/>.
        /// </summary>
        /// <param name="bufferOffset">The offset of the mix buffer.</param>
        /// <param name="upsampler">The <see cref="UpsamplerState"/> associated.</param>
        /// <param name="inputCount">The total input count.</param>
        /// <param name="inputBufferOffset">The input buffer mix offset.</param>
        /// <param name="bufferCountPerSample">The buffer count per sample.</param>
        /// <param name="sampleCount">The source sample count.</param>
        /// <param name="sampleRate">The source sample rate.</param>
        /// <param name="nodeId">The node id associated to this command.</param>
        public void GenerateUpsample(uint bufferOffset, UpsamplerState upsampler, uint inputCount, Span <byte> inputBufferOffset, uint bufferCountPerSample, uint sampleCount, uint sampleRate, int nodeId)
        {
            UpsampleCommand command = new UpsampleCommand(bufferOffset, upsampler, inputCount, inputBufferOffset, bufferCountPerSample, sampleCount, sampleRate, nodeId);

            command.EstimatedProcessingTime = _commandProcessingTimeEstimator.Estimate(command);

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

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

            return((uint)0.0f);
        }
Beispiel #3
0
 public uint Estimate(UpsampleCommand command)
 {
     return(357915);
 }