mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-19 01:27:18 -04:00
fix(openal-soft/lwjgl): PolyPatcher crash/audio Part 2
The actual fix
This commit is contained in:
parent
5a4a060a2e
commit
7641ba9c4f
Binary file not shown.
@ -1 +1 @@
|
|||||||
43b35fab0d5e7f064ae992f15f2a4f9301461f29
|
02e09ed8760774bfa1222432ca2ad25b70b191d7
|
@ -6,6 +6,7 @@ package org.lwjgl.openal;
|
|||||||
|
|
||||||
import org.lwjgl.*;
|
import org.lwjgl.*;
|
||||||
import org.lwjgl.system.*;
|
import org.lwjgl.system.*;
|
||||||
|
import org.lwjgl.system.MemoryUtil;
|
||||||
|
|
||||||
import javax.annotation.*;
|
import javax.annotation.*;
|
||||||
import java.nio.*;
|
import java.nio.*;
|
||||||
@ -98,10 +99,9 @@ public final class AL {
|
|||||||
attribs.put(0);
|
attribs.put(0);
|
||||||
attribs.flip();
|
attribs.flip();
|
||||||
|
|
||||||
long contextHandle = ALC10.alcCreateContext(alDevice, attribs);
|
|
||||||
ALC10.alcMakeContextCurrent(contextHandle);
|
|
||||||
//alContext = new ALContext(alDevice, contextHandle);
|
//alContext = new ALContext(alDevice, contextHandle);
|
||||||
alContext = ALC10.alcCreateContext(contextHandle, (IntBuffer)null);
|
alContext = ALC10.alcCreateContext(alDevice, attribs);
|
||||||
|
ALC10.alcMakeContextCurrent(alContext);
|
||||||
alContextCaps = ALC.createCapabilities(alDevice);
|
alContextCaps = ALC.createCapabilities(alDevice);
|
||||||
|
|
||||||
alCaps = AL.createCapabilities(alContextCaps);
|
alCaps = AL.createCapabilities(alContextCaps);
|
||||||
@ -133,10 +133,9 @@ public final class AL {
|
|||||||
attribs.put(0);
|
attribs.put(0);
|
||||||
attribs.flip();
|
attribs.flip();
|
||||||
|
|
||||||
long contextHandle = ALC10.alcCreateContext(alDevice, attribs);
|
|
||||||
ALC10.alcMakeContextCurrent(contextHandle);
|
|
||||||
//alContext = new ALContext(alDevice, contextHandle);
|
//alContext = new ALContext(alDevice, contextHandle);
|
||||||
alContext = ALC10.alcCreateContext(contextHandle, (IntBuffer)null);
|
alContext = ALC10.alcCreateContext(alDevice, attribs);
|
||||||
|
ALC10.alcMakeContextCurrent(alContext);
|
||||||
alContextCaps = ALC.createCapabilities(alDevice);
|
alContextCaps = ALC.createCapabilities(alDevice);
|
||||||
|
|
||||||
alCaps = AL.createCapabilities(alContextCaps);
|
alCaps = AL.createCapabilities(alContextCaps);
|
||||||
@ -173,7 +172,7 @@ public final class AL {
|
|||||||
ALC10.alcMakeContextCurrent(MemoryUtil.NULL);
|
ALC10.alcMakeContextCurrent(MemoryUtil.NULL);
|
||||||
ALC10.alcDestroyContext(alContext);
|
ALC10.alcDestroyContext(alContext);
|
||||||
ALC10.alcCloseDevice(alcDevice.device);
|
ALC10.alcCloseDevice(alcDevice.device);
|
||||||
alContext = -1;
|
alContext = MemoryUtil.NULL;
|
||||||
alcDevice = null;
|
alcDevice = null;
|
||||||
created_lwjgl2 = false;
|
created_lwjgl2 = false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user