Esempio n. 1
0
        /// <summary>
        /// Create a new <see cref="DownMixSurroundToStereoCommand"/>.
        /// </summary>
        /// <param name="bufferOffset">The offset of the mix buffer.</param>
        /// <param name="inputBufferOffset">The input buffer offset.</param>
        /// <param name="outputBufferOffset">The output buffer offset.</param>
        /// <param name="downMixParameter">The downmixer parameters to use.</param>
        /// <param name="nodeId">The node id associated to this command.</param>
        public void GenerateDownMixSurroundToStereo(uint bufferOffset, Span <byte> inputBufferOffset, Span <byte> outputBufferOffset, float[] downMixParameter, int nodeId)
        {
            DownMixSurroundToStereoCommand command = new DownMixSurroundToStereoCommand(bufferOffset, inputBufferOffset, outputBufferOffset, downMixParameter, nodeId);

            command.EstimatedProcessingTime = _commandProcessingTimeEstimator.Estimate(command);

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

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

            return((uint)14679.0f);
        }
Esempio n. 3
0
 public uint Estimate(DownMixSurroundToStereoCommand command)
 {
     return(16108);
 }