From 8f4a75f9f31e45cd2d3c2bbae27dd67f2c6f94ed Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Fri, 17 Jul 2009 21:21:52 +0000 Subject: [PATCH] Specify correct sizes for Alc.GetInteger buffers (needs size in integers, not size in bytes). --- Source/OpenTK/Audio/AudioContext.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/OpenTK/Audio/AudioContext.cs b/Source/OpenTK/Audio/AudioContext.cs index b663c1e5..efe765c2 100644 --- a/Source/OpenTK/Audio/AudioContext.cs +++ b/Source/OpenTK/Audio/AudioContext.cs @@ -342,11 +342,11 @@ namespace OpenTK.Audio device_name = Alc.GetString(device_handle, AlcGetString.DeviceSpecifier); int attribute_count; - Alc.GetInteger(device_handle, AlcGetInteger.AttributesSize, sizeof(int), out attribute_count); + Alc.GetInteger(device_handle, AlcGetInteger.AttributesSize, 1, out attribute_count); if (attribute_count > 0) { int[] device_attributes = new int[attribute_count]; - Alc.GetInteger(device_handle, AlcGetInteger.AllAttributes, device_attributes.Length * sizeof(int), out device_attributes[0]); + Alc.GetInteger(device_handle, AlcGetInteger.AllAttributes, device_attributes.Length, device_attributes); foreach (int attr in device_attributes) { switch ((AlcContextAttributes)attr)