/// <summary> /// Create a new <see cref="DeviceSinkCommand"/>. /// </summary> /// <param name="bufferOffset">The offset of the mix buffer.</param> /// <param name="sink">The <see cref="BaseSink"/> of the device sink.</param> /// <param name="sessionId">The current audio renderer session id.</param> /// <param name="buffer">The mix buffer in use.</param> /// <param name="nodeId">The node id associated to this command.</param> public void GenerateDeviceSink(uint bufferOffset, DeviceSink sink, int sessionId, Memory <float> buffer, int nodeId) { DeviceSinkCommand command = new DeviceSinkCommand(bufferOffset, sink, sessionId, buffer, nodeId); command.EstimatedProcessingTime = _commandProcessingTimeEstimator.Estimate(command); AddCommand(command); }
public uint Estimate(DeviceSinkCommand command) { Debug.Assert(_sampleCount == 160 || _sampleCount == 240); Debug.Assert(command.InputCount == 2 || command.InputCount == 6); if (command.InputCount == 2) { if (_sampleCount == 160) { return((uint)8980.0f); } return((uint)9221.9f); } if (_sampleCount == 160) { return((uint)9177.9f); } return((uint)9725.9f); }
public uint Estimate(DeviceSinkCommand command) { Debug.Assert(_sampleCount == 160 || _sampleCount == 240); Debug.Assert(command.InputCount == 2 || command.InputCount == 6); if (command.InputCount == 2) { if (_sampleCount == 160) { return((uint)9261.5f); } return((uint)9336.1f); } if (_sampleCount == 160) { return((uint)9111.8f); } return((uint)9566.7f); }
public uint Estimate(DeviceSinkCommand command) { return(10042); }