From cee712105850ac3385cd0091a923438167433f9f Mon Sep 17 00:00:00 2001
From: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
Date: Sat, 8 Apr 2023 01:22:00 +0200
Subject: Move solution and projects to src
---
.../Performance/PerformanceEntryAddresses.cs | 56 ++++++++++++++++++++++
1 file changed, 56 insertions(+)
create mode 100644 src/Ryujinx.Audio/Renderer/Server/Performance/PerformanceEntryAddresses.cs
(limited to 'src/Ryujinx.Audio/Renderer/Server/Performance/PerformanceEntryAddresses.cs')
diff --git a/src/Ryujinx.Audio/Renderer/Server/Performance/PerformanceEntryAddresses.cs b/src/Ryujinx.Audio/Renderer/Server/Performance/PerformanceEntryAddresses.cs
new file mode 100644
index 00000000..1b8d8668
--- /dev/null
+++ b/src/Ryujinx.Audio/Renderer/Server/Performance/PerformanceEntryAddresses.cs
@@ -0,0 +1,56 @@
+using System;
+
+namespace Ryujinx.Audio.Renderer.Server.Performance
+{
+ ///
+ /// Information used by the performance command to store informations in the performance entry.
+ ///
+ public class PerformanceEntryAddresses
+ {
+ ///
+ /// The memory storing the performance entry.
+ ///
+ public Memory BaseMemory;
+
+ ///
+ /// The offset to the start time field.
+ ///
+ public uint StartTimeOffset;
+
+ ///
+ /// The offset to the entry count field.
+ ///
+ public uint EntryCountOffset;
+
+ ///
+ /// The offset to the processing time field.
+ ///
+ public uint ProcessingTimeOffset;
+
+ ///
+ /// Increment the entry count.
+ ///
+ public void IncrementEntryCount()
+ {
+ BaseMemory.Span[(int)EntryCountOffset / 4]++;
+ }
+
+ ///
+ /// Set the start time in the entry.
+ ///
+ /// The start time in nanoseconds.
+ public void SetStartTime(ulong startTimeNano)
+ {
+ BaseMemory.Span[(int)StartTimeOffset / 4] = (int)(startTimeNano / 1000);
+ }
+
+ ///
+ /// Set the processing time in the entry.
+ ///
+ /// The end time in nanoseconds.
+ public void SetProcessingTime(ulong endTimeNano)
+ {
+ BaseMemory.Span[(int)ProcessingTimeOffset / 4] = (int)(endTimeNano / 1000) - BaseMemory.Span[(int)StartTimeOffset / 4];
+ }
+ }
+}
\ No newline at end of file
--
cgit v1.2.3