mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-26 05:25:35 +00:00
Prefer Alc.OpenDevice(null) over Alc.OpenDevice(Alc.GetString(0, AlcGetString.DefaultDeviceSpecifier))
This commit is contained in:
parent
f5509cd21c
commit
2e754ad9ce
|
@ -256,12 +256,12 @@ namespace OpenTK.Audio
|
||||||
|
|
||||||
if (!String.IsNullOrEmpty(device))
|
if (!String.IsNullOrEmpty(device))
|
||||||
device_handle = Alc.OpenDevice(device);
|
device_handle = Alc.OpenDevice(device);
|
||||||
|
if (device_handle == IntPtr.Zero)
|
||||||
|
device_handle = Alc.OpenDevice(null);
|
||||||
if (device_handle == IntPtr.Zero)
|
if (device_handle == IntPtr.Zero)
|
||||||
Alc.OpenDevice(Alc.GetString(IntPtr.Zero, AlcGetString.DefaultDeviceSpecifier));
|
Alc.OpenDevice(Alc.GetString(IntPtr.Zero, AlcGetString.DefaultDeviceSpecifier));
|
||||||
if (device_handle == IntPtr.Zero && available_devices.Count > 0)
|
if (device_handle == IntPtr.Zero && available_devices.Count > 0)
|
||||||
device_handle = Alc.OpenDevice(available_devices[0]);
|
device_handle = Alc.OpenDevice(available_devices[0]);
|
||||||
if (device_handle == IntPtr.Zero)
|
|
||||||
device_handle = Alc.OpenDevice(null);
|
|
||||||
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));
|
||||||
|
|
Loading…
Reference in a new issue