/// <summary> /// Generate a new <see cref="DepopPrepareCommand"/>. /// </summary> /// <param name="state">The voice state associated.</param> /// <param name="depopBuffer">The depop buffer.</param> /// <param name="bufferCount">The buffer count.</param> /// <param name="bufferOffset">The target buffer offset.</param> /// <param name="nodeId">The node id associated to this command.</param> /// <param name="wasPlaying">Set to true if the voice was playing previously.</param> public void GenerateDepopPrepare(Memory <VoiceUpdateState> state, Memory <float> depopBuffer, uint bufferCount, uint bufferOffset, int nodeId, bool wasPlaying) { DepopPrepareCommand command = new DepopPrepareCommand(state, depopBuffer, bufferCount, bufferOffset, nodeId, wasPlaying); command.EstimatedProcessingTime = _commandProcessingTimeEstimator.Estimate(command); AddCommand(command); }
public uint Estimate(DepopPrepareCommand command) { Debug.Assert(_sampleCount == 160 || _sampleCount == 240); if (_sampleCount == 160) { return((uint)306.62f); } return((uint)293.22f); }
public uint Estimate(DepopPrepareCommand command) { return(0); }