From a8c41b779da7d264ade550496b25afc19be525e3 Mon Sep 17 00:00:00 2001 From: minenice55 Date: Mon, 8 Jan 2024 22:31:29 -0500 Subject: [PATCH 1/2] test to ID input issue TO REVERT --- Assets/Scripts/InputSystem/PlayerInput.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Assets/Scripts/InputSystem/PlayerInput.cs b/Assets/Scripts/InputSystem/PlayerInput.cs index f8668236..4c4cc471 100644 --- a/Assets/Scripts/InputSystem/PlayerInput.cs +++ b/Assets/Scripts/InputSystem/PlayerInput.cs @@ -158,6 +158,7 @@ namespace HeavenStudio foreach (InputController i in inputDevices) { if (i == null) continue; + Debug.Log($"Polling controller {i.GetDeviceName()} (frame {Time.frameCount})"); i.UpdateState(); } } From e2070c5fa3d02cb6de4f63f74ec25625a4e306c5 Mon Sep 17 00:00:00 2001 From: minenice55 Date: Mon, 8 Jan 2024 22:52:31 -0500 Subject: [PATCH 2/2] (hopefully) fix controllers not being initialized with certain settings --- Assets/Scripts/GlobalGameManager.cs | 1 - Assets/Scripts/InputSystem/PlayerInput.cs | 1 - Assets/Scripts/Util/SavWav.cs | 2 ++ 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/GlobalGameManager.cs b/Assets/Scripts/GlobalGameManager.cs index 85ebaee0..ddded770 100644 --- a/Assets/Scripts/GlobalGameManager.cs +++ b/Assets/Scripts/GlobalGameManager.cs @@ -108,7 +108,6 @@ namespace HeavenStudio // ChangeAudioSettings(currentDspSize, currentSampleRate); AudioConfiguration config = AudioSettings.GetConfiguration(); - if (currentDspSize == config.dspBufferSize && currentSampleRate == config.sampleRate) return; config.dspBufferSize = currentDspSize; config.sampleRate = currentSampleRate; AudioSettings.Reset(config); diff --git a/Assets/Scripts/InputSystem/PlayerInput.cs b/Assets/Scripts/InputSystem/PlayerInput.cs index 4c4cc471..f8668236 100644 --- a/Assets/Scripts/InputSystem/PlayerInput.cs +++ b/Assets/Scripts/InputSystem/PlayerInput.cs @@ -158,7 +158,6 @@ namespace HeavenStudio foreach (InputController i in inputDevices) { if (i == null) continue; - Debug.Log($"Polling controller {i.GetDeviceName()} (frame {Time.frameCount})"); i.UpdateState(); } } diff --git a/Assets/Scripts/Util/SavWav.cs b/Assets/Scripts/Util/SavWav.cs index 3ea7d8e1..e3167257 100644 --- a/Assets/Scripts/Util/SavWav.cs +++ b/Assets/Scripts/Util/SavWav.cs @@ -67,6 +67,8 @@ public static class SavWav { var wav = GetWav(clip, out var length, trim); writer.Write(wav, 0, (int)length); + fileStream.Close(); + fileStream.Dispose(); } }