From 1bc6cc4395a998440e48f45f06bf9d80cf3de6e1 Mon Sep 17 00:00:00 2001 From: Xerxes Rånby Date: Wed, 30 Jan 2013 14:29:38 +0100 Subject: Improve ALExtLoopbackDeviceSOFTTest to list all available OpenAL extensions. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Xerxes Rånby --- .../openal/test/junit/ALExtLoopbackDeviceSOFTTest.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/test/com/jogamp/openal/test/junit/ALExtLoopbackDeviceSOFTTest.java b/src/test/com/jogamp/openal/test/junit/ALExtLoopbackDeviceSOFTTest.java index a782c3a..7718cff 100644 --- a/src/test/com/jogamp/openal/test/junit/ALExtLoopbackDeviceSOFTTest.java +++ b/src/test/com/jogamp/openal/test/junit/ALExtLoopbackDeviceSOFTTest.java @@ -26,12 +26,16 @@ public class ALExtLoopbackDeviceSOFTTest { public void testAlCLoopbackDeviceSOFT() throws UnsupportedAudioFileException, IOException { ALC alc = ALFactory.getALC(); - ALCdevice device = alc.alcOpenDevice(null); + ALCdevice dev = alc.alcOpenDevice(null); + ALCcontext context = alc.alcCreateContext(dev,null); + alc.alcMakeContextCurrent(context); AL al = ALFactory.getAL(); - - boolean have = alc.alcIsExtensionPresent(null, "ALC_SOFT_loopback"); - - ALCdevice dev; + + System.out.println("Available null device OpenAL Extensions:"+alc.alcGetString(null, alc.ALC_EXTENSIONS)); + System.out.println("Available device OpenAL Extensions:"+alc.alcGetString(dev, alc.ALC_EXTENSIONS)); + + boolean have = alc.alcIsExtensionPresent(dev, "ALC_SOFT_loopback"); + Exception ex = null; ALExt alext = ALFactory.getALExt(); @@ -56,7 +60,6 @@ public class ALExtLoopbackDeviceSOFTTest { assertNotNull(dev); WAVData wd = null; - ALCcontext context = null; try { wd = WAVLoader.loadFromStream(ResourceLocation.getTestStream0()); -- cgit v1.2.3