mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-06-30 04:16:25 +02:00
Move solution and projects to src
This commit is contained in:
parent
cd124bda58
commit
cee7121058
3466 changed files with 55 additions and 55 deletions
47
src/Ryujinx.Audio/Renderer/Dsp/Command/PerformanceCommand.cs
Normal file
47
src/Ryujinx.Audio/Renderer/Dsp/Command/PerformanceCommand.cs
Normal file
|
@ -0,0 +1,47 @@
|
|||
using Ryujinx.Audio.Renderer.Server.Performance;
|
||||
|
||||
namespace Ryujinx.Audio.Renderer.Dsp.Command
|
||||
{
|
||||
public class PerformanceCommand : ICommand
|
||||
{
|
||||
public enum Type
|
||||
{
|
||||
Invalid,
|
||||
Start,
|
||||
End
|
||||
}
|
||||
|
||||
public bool Enabled { get; set; }
|
||||
|
||||
public int NodeId { get; }
|
||||
|
||||
public CommandType CommandType => CommandType.Performance;
|
||||
|
||||
public uint EstimatedProcessingTime { get; set; }
|
||||
|
||||
public PerformanceEntryAddresses PerformanceEntryAddresses { get; }
|
||||
|
||||
public Type PerformanceType { get; set; }
|
||||
|
||||
public PerformanceCommand(ref PerformanceEntryAddresses performanceEntryAddresses, Type performanceType, int nodeId)
|
||||
{
|
||||
Enabled = true;
|
||||
PerformanceEntryAddresses = performanceEntryAddresses;
|
||||
PerformanceType = performanceType;
|
||||
NodeId = nodeId;
|
||||
}
|
||||
|
||||
public void Process(CommandList context)
|
||||
{
|
||||
if (PerformanceType == Type.Start)
|
||||
{
|
||||
PerformanceEntryAddresses.SetStartTime(context.GetTimeElapsedSinceDspStartedProcessing());
|
||||
}
|
||||
else if (PerformanceType == Type.End)
|
||||
{
|
||||
PerformanceEntryAddresses.SetProcessingTime(context.GetTimeElapsedSinceDspStartedProcessing());
|
||||
PerformanceEntryAddresses.IncrementEntryCount();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue