Fixed sync attribute in AudioContext constructor (patch by erluk). Fixes bug [#830] "AudioContext: Wrong parameters passed to Alc.CreateContext" (http://www.opentk.com/node/830).
This commit is contained in:
parent
222bded7ff
commit
65205d8cd5
1 changed files with 2 additions and 2 deletions
|
@ -259,7 +259,7 @@ namespace OpenTK.Audio
|
||||||
device_handle = Alc.OpenDevice(available_devices[0]);
|
device_handle = Alc.OpenDevice(available_devices[0]);
|
||||||
if (device_handle == IntPtr.Zero)
|
if (device_handle == IntPtr.Zero)
|
||||||
throw new AudioDeviceException(String.Format("Audio device '{0}' does not exist or is tied up by another application.",
|
throw new AudioDeviceException(String.Format("Audio device '{0}' does not exist or is tied up by another application.",
|
||||||
String.IsNullOrEmpty(device) ? "default" : device));
|
String.IsNullOrEmpty(device) ? "default" : device));
|
||||||
|
|
||||||
CheckForAlcErrors();
|
CheckForAlcErrors();
|
||||||
|
|
||||||
|
@ -278,7 +278,7 @@ namespace OpenTK.Audio
|
||||||
attributes.Add(refresh);
|
attributes.Add(refresh);
|
||||||
}
|
}
|
||||||
|
|
||||||
attributes.Add((int)AlcContextAttributes.Frequency);
|
attributes.Add((int)AlcContextAttributes.Sync);
|
||||||
attributes.Add(sync ? 1 : 0);
|
attributes.Add(sync ? 1 : 0);
|
||||||
|
|
||||||
if (enableEfx && Alc.IsExtensionPresent(device_handle, "ALC_EXT_EFX"))
|
if (enableEfx && Alc.IsExtensionPresent(device_handle, "ALC_EXT_EFX"))
|
||||||
|
|
Loading…
Reference in a new issue