mirror of
https://github.com/GTNewHorizons/lwjgl3ify.git
synced 2026-11-26 15:02:57 +00:00
Fix OpenAL ignoring the requested output device (#366)
This commit is contained in:
1 parent
bc12f5818c
commit
a2eac5eca5
1 file changed
+3
-5
@@ -4,7 +4,6 @@ import static org.lwjgl.system.MemoryStack.stackPush;
|
||||
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
import org.lwjgl.openal.ALC10;
|
||||
import org.lwjgl.openal.ALCCapabilities;
|
||||
import org.lwjgl.system.MemoryStack;
|
||||
import org.lwjglx.LWJGLException;
|
||||
@@ -63,12 +62,11 @@ public class AL {
|
||||
attribs.put(0);
|
||||
attribs.flip();
|
||||
|
||||
String defaultDevice = org.lwjgl.openal.ALC10.alcGetString(0, ALC10.ALC_DEFAULT_DEVICE_SPECIFIER);
|
||||
|
||||
long deviceHandle = org.lwjgl.openal.ALC10.alcOpenDevice(defaultDevice);
|
||||
long deviceHandle = org.lwjgl.openal.ALC10.alcOpenDevice(deviceArguments);
|
||||
|
||||
if (deviceHandle == 0) {
|
||||
throw new LWJGLException("Could not open ALC device");
|
||||
throw new LWJGLException(
|
||||
"Could not open ALC device: " + (deviceArguments == null ? "default" : deviceArguments));
|
||||
}
|
||||
|
||||
alcDevice = new ALCdevice(deviceHandle);
|
||||
|
||||
Reference in new issue
Block a user