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/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(); } }