diff options
-rw-r--r-- | src/java/com/jogamp/openal/sound3d/Context.java | 3 | ||||
-rw-r--r-- | src/test/com/jogamp/openal/test/manual/Sound3DTest.java | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/java/com/jogamp/openal/sound3d/Context.java b/src/java/com/jogamp/openal/sound3d/Context.java index 6cd19d6..28e033e 100644 --- a/src/java/com/jogamp/openal/sound3d/Context.java +++ b/src/java/com/jogamp/openal/sound3d/Context.java @@ -75,8 +75,7 @@ public class Context { * @param device The device the Context is being created for. */ public Context(final Device device) { - this.device = device; - this.alCtx = AudioSystem3D.alc.alcCreateContext(device.getALDevice(), null); + this(AudioSystem3D.alc.alcCreateContext(device.getALDevice(), null), device); } /** diff --git a/src/test/com/jogamp/openal/test/manual/Sound3DTest.java b/src/test/com/jogamp/openal/test/manual/Sound3DTest.java index 1a792b6..62a758a 100644 --- a/src/test/com/jogamp/openal/test/manual/Sound3DTest.java +++ b/src/test/com/jogamp/openal/test/manual/Sound3DTest.java @@ -64,7 +64,7 @@ public class Sound3DTest { // create the initial context - this can be collapsed into the init. final Device device = AudioSystem3D.openDevice(null); - final Context context = AudioSystem3D.createContext(device); + final Context context = new Context(device); if( !context.makeCurrent() ) { System.err.println("Context.makeCurrent() failed"); return; |