mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-10-01 12:30:00 +02:00
dff138229c
* amadeus: Allow OOB read of GC-ADPCM coefficients Fixes "Ninja Gaiden Sigma 2" and possibly "NINJA GAIDEN 3: Razor's Edge" * amadeus: Fix wrong variable usage in delay effect We should transform the delay line values, not the input. * amadeus: Update GroupedBiquadFilterCommand documentation * amadeus: Simplify PoolMapper alignment checks * amadeus: Update Surround delay effect matrix to REV11 * amadeus: Add drop parameter support and use 32 bits integers for estimate time Also implement accurate ExecuteAudioRendererRendering stub. * Address gdkchan's comments * Address gdkchan's other comments * Address gdkchan's comment
47 lines
No EOL
1.4 KiB
C#
47 lines
No EOL
1.4 KiB
C#
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();
|
|
}
|
|
}
|
|
}
|
|
} |