Skip to content

Commit

Permalink
🔈 MemoryStream uses Dispose() instead of Close() for WSA compat.
Browse files Browse the repository at this point in the history
  • Loading branch information
deadlyfingers committed Jan 17, 2017
1 parent a16d01f commit 2846545
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions WavUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ public static byte[] FromAudioClip (AudioClip audioClip, out string filepath, bo
filepath = null;
}

stream.Close ();
stream.Dispose ();

return bytes;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 2846545

Please sign in to comment.