/// <summary> /// Create a new <see cref="VolumeRampCommand"/>. /// </summary> /// <param name="previousVolume">The previous volume.</param> /// <param name="volume">The new volume.</param> /// <param name="bufferIndex">The index of the mix buffer to use.</param> /// <param name="nodeId">The node id associated to this command.</param> public void GenerateVolumeRamp(float previousVolume, float volume, uint bufferIndex, int nodeId) { VolumeRampCommand command = new VolumeRampCommand(previousVolume, volume, bufferIndex, nodeId); command.EstimatedProcessingTime = _commandProcessingTimeEstimator.Estimate(command); AddCommand(command); }
public uint Estimate(VolumeRampCommand command) { Debug.Assert(_sampleCount == 160 || _sampleCount == 240); if (_sampleCount == 160) { return((uint)1425.3f); } return((uint)1700.0f); }
public uint Estimate(VolumeRampCommand command) { return((uint)(_sampleCount * 9.8f * 1.2f)); }