mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-11 17:55:39 +00:00
Specify correct sizes for Alc.GetInteger buffers (needs size in integers, not size in bytes).
This commit is contained in:
parent
cbe3bc6bbb
commit
d021884d01
|
@ -342,11 +342,11 @@ namespace OpenTK.Audio
|
||||||
|
|
||||||
device_name = Alc.GetString(device_handle, AlcGetString.DeviceSpecifier);
|
device_name = Alc.GetString(device_handle, AlcGetString.DeviceSpecifier);
|
||||||
int attribute_count;
|
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)
|
if (attribute_count > 0)
|
||||||
{
|
{
|
||||||
int[] device_attributes = new int[attribute_count];
|
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)
|
foreach (int attr in device_attributes)
|
||||||
{
|
{
|
||||||
switch ((AlcContextAttributes)attr)
|
switch ((AlcContextAttributes)attr)
|
||||||
|
|
Loading…
Reference in a new issue