v1.7.7.0 (Winter Update 2024)

This commit is contained in:
Regalis11
2024-12-11 13:26:13 +02:00
parent 7d5b7a310a
commit f6349b2175
256 changed files with 4794 additions and 1653 deletions
@@ -258,11 +258,11 @@ namespace OpenAL
public static void GetInteger(IntPtr device, int param, out int data)
{
int[] dataArr = new int[1];
GCHandle handle = GCHandle.Alloc(dataArr,GCHandleType.Pinned);
data = 0; // (Optimization: let's pin an integer on the stack instead of an array on the heap, which previously allocated almost a GB of memory)
GCHandle handle = GCHandle.Alloc(data, GCHandleType.Pinned);
GetIntegerv(device, param, 1, handle.AddrOfPinnedObject());
data = Marshal.ReadInt32(handle.AddrOfPinnedObject());
handle.Free();
data = dataArr[0];
}
#endregion