From 70f497958b24c88d66332072f00d42a14f5f7c2c Mon Sep 17 00:00:00 2001 From: VoidX Date: Sun, 21 Jul 2024 16:30:56 +0200 Subject: [PATCH] Updated Unity to 2022.3.30f1 --- Cavern.QuickEQ/VerboseImpulseResponse.cs | 6 +++--- Cavern.WPF/ConvolutionEditor.xaml.cs | 2 +- CavernUnity DLL/CavernUnity DLL.csproj | 12 ++++++------ CavernUnity DLL/QuickEQ/SpeakerSweeper.cs | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Cavern.QuickEQ/VerboseImpulseResponse.cs b/Cavern.QuickEQ/VerboseImpulseResponse.cs index 89b1bda3..4971965e 100644 --- a/Cavern.QuickEQ/VerboseImpulseResponse.cs +++ b/Cavern.QuickEQ/VerboseImpulseResponse.cs @@ -31,7 +31,7 @@ public float[] Response { if (response != null) { return response; } - return response = Measurements.GetRealPart(ComplexResponse.IFFT()); + return response = Measurements.GetRealPart(ComplexResponse); } } float[] response; @@ -219,7 +219,7 @@ public Peak(int position, float size) { public static int GetDelay(float[] response) { int result = 0; float absPeak = float.NegativeInfinity, absHere; - for (int pos = 0; pos < response.Length; ++pos) { + for (int pos = 0; pos < response.Length; pos++) { absHere = Math.Abs(response[pos]); if (absPeak < absHere) { absPeak = absHere; @@ -237,7 +237,7 @@ public Peak GetPeak(int position) { List peakList = new List(); float[] raw = Response; float last = Math.Abs(raw[0]), abs = Math.Abs(raw[1]); - for (int pos = 2; pos < raw.Length; ++pos) { + for (int pos = 2; pos < raw.Length; pos++) { float next = Math.Abs(raw[pos]); if (abs > last && abs > next) { peakList.Add(new Peak(pos - 1, abs)); diff --git a/Cavern.WPF/ConvolutionEditor.xaml.cs b/Cavern.WPF/ConvolutionEditor.xaml.cs index a71abe64..9b3ece80 100644 --- a/Cavern.WPF/ConvolutionEditor.xaml.cs +++ b/Cavern.WPF/ConvolutionEditor.xaml.cs @@ -116,7 +116,7 @@ void Reset() { WaveformUtils.Gain(phaseGraph, 25 / MathF.PI); fftDisplay.AddCurve(EQGenerator.FromGraph(phaseGraph, 20, maxFreq), 0xFFFF0000); - VerboseImpulseResponse verbose = new(fft); + VerboseImpulseResponse verbose = new(impulse); polarity.Text = string.Format((string)language["VPola"], verbose.Polarity ? '+' : '-'); phaseDisplay.Text = string.Format((string)language["VPhas"], (180 / Math.PI * verbose.Phase).ToString("0.00")); delay.Text = string.Format((string)language["VDela"], verbose.Delay); diff --git a/CavernUnity DLL/CavernUnity DLL.csproj b/CavernUnity DLL/CavernUnity DLL.csproj index 60fd98ae..9846e40d 100644 --- a/CavernUnity DLL/CavernUnity DLL.csproj +++ b/CavernUnity DLL/CavernUnity DLL.csproj @@ -40,12 +40,12 @@ - - ..\..\..\2022.3.15f1\Editor\Data\Managed\UnityEditor.dll - - - ..\..\..\2022.3.15f1\Editor\Data\Managed\UnityEngine.dll - + + ..\..\..\2022.3.30f1\Editor\Data\Managed\UnityEditor.dll + + + ..\..\..\2022.3.30f1\Editor\Data\Managed\UnityEngine.dll + diff --git a/CavernUnity DLL/QuickEQ/SpeakerSweeper.cs b/CavernUnity DLL/QuickEQ/SpeakerSweeper.cs index c2c2ab1b..25fd0137 100644 --- a/CavernUnity DLL/QuickEQ/SpeakerSweeper.cs +++ b/CavernUnity DLL/QuickEQ/SpeakerSweeper.cs @@ -366,7 +366,7 @@ public WorkerResult(Complex[] sweepFFT, FFTCache sweepFFTCache, float[] response ImpResponse = new VerboseImpulseResponse(Measurements.GetImpulseResponse(rawResponse, sweepFFTCache)); } - public bool IsNull() => FreqResponse == null || ImpResponse == null; + public readonly bool IsNull() => FreqResponse == null || ImpResponse == null; } } } \ No newline at end of file