From 2846545e859c74839fd9c4a6f1b1a1a409b19961 Mon Sep 17 00:00:00 2001 From: David Douglas Date: Tue, 17 Jan 2017 15:01:00 +0000 Subject: [PATCH] :speaker: MemoryStream uses Dispose() instead of Close() for WSA compat. --- WavUtility.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/WavUtility.cs b/WavUtility.cs index 6e358eb..0d32f59 100644 --- a/WavUtility.cs +++ b/WavUtility.cs @@ -225,7 +225,6 @@ public static byte[] FromAudioClip (AudioClip audioClip, out string filepath, bo filepath = null; } - stream.Close (); stream.Dispose (); return bytes; @@ -335,7 +334,6 @@ private static byte[] ConvertAudioClipDataToInt16ByteArray (float[] data) // Validate converted bytes Debug.AssertFormat (data.Length * x == bytes.Length, "Unexpected float[] to Int16 to byte[] size: {0} == {1}", data.Length * x, bytes.Length); - dataStream.Close (); dataStream.Dispose (); return bytes;