Skip to content

Commit

Permalink
Updated Unity to 2022.3.30f1
Browse files Browse the repository at this point in the history
  • Loading branch information
VoidXH committed Jul 21, 2024
1 parent 79e0e0e commit 70f4979
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions Cavern.QuickEQ/VerboseImpulseResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -237,7 +237,7 @@ public Peak GetPeak(int position) {
List<Peak> peakList = new List<Peak>();
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));
Expand Down
2 changes: 1 addition & 1 deletion Cavern.WPF/ConvolutionEditor.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
12 changes: 6 additions & 6 deletions CavernUnity DLL/CavernUnity DLL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@
<ProjectReference Include="..\Cavern\Cavern.csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="UnityEditor">
<HintPath>..\..\..\2022.3.15f1\Editor\Data\Managed\UnityEditor.dll</HintPath>
</Reference>
<Reference Include="UnityEngine">
<HintPath>..\..\..\2022.3.15f1\Editor\Data\Managed\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEditor">
<HintPath>..\..\..\2022.3.30f1\Editor\Data\Managed\UnityEditor.dll</HintPath>
</Reference>
<Reference Include="UnityEngine">
<HintPath>..\..\..\2022.3.30f1\Editor\Data\Managed\UnityEngine.dll</HintPath>
</Reference>
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="copy ..\CavernAmp\bin\Release\CavernAmp.dll bin\Release\CavernAmp.dll" IgnoreExitCode="true" />
Expand Down
2 changes: 1 addition & 1 deletion CavernUnity DLL/QuickEQ/SpeakerSweeper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}

0 comments on commit 70f4979

Please sign in to comment.