28package com.jogamp.openal.test.junit;
30import java.io.IOException;
32import org.junit.FixMethodOrder;
34import org.junit.After;
35import org.junit.Assert;
36import org.junit.runners.MethodSorters;
38import com.jogamp.common.util.VersionNumber;
39import com.jogamp.openal.ALC;
40import com.jogamp.openal.ALCcontext;
41import com.jogamp.openal.ALCdevice;
42import com.jogamp.openal.ALFactory;
43import com.jogamp.openal.ALVersion;
44import com.jogamp.openal.JoalVersion;
45import com.jogamp.openal.test.util.UITestCase;
52@FixMethodOrder(MethodSorters.NAME_ASCENDING)
54 static private final String OpenALVendor =
"OpenAL Community";
55 static private final String OpenALRenderer =
"OpenAL Soft";
56 static private final VersionNumber ALVersion11 =
new VersionNumber(1, 1, 0);
57 static private final VersionNumber OpenALVersion1230 =
new VersionNumber(1, 23, 0);
62 final int versionComp = alv.
getVersion().compareTo(ALVersion11);
63 final int vendorVersionComp = alv.getVendorVersion().compareTo(OpenALVersion1230);
64 System.out.println(
"ALVersion: "+alv.
toString()+
", version >= 1.1: "+versionComp+
", vendorVersion >= 1.23.0: "+vendorVersionComp);
65 Assert.assertEquals(OpenALVendor, alv.
getVendor());
66 Assert.assertEquals(OpenALRenderer, alv.
getRenderer());
67 Assert.assertTrue( versionComp >= 0 );
68 Assert.assertTrue( vendorVersionComp >= 0 );
84 System.err.println(jv.
toString(alc));
86 Assert.assertNotNull(currentContext);
89 Assert.assertNotNull(currentDevice);
97 System.err.println(jv.
toString(alc));
99 Assert.assertNull(currentContext);
108 if(
null != context) {
117 public static void main(
final String args[])
throws IOException {
118 org.junit.runner.JUnitCore.main(
ALVersionTest.class.getName());
final long getDirectBufferAddress()
Returns the native address of the underlying native ByteBuffer getBuffer().
final long getDirectBufferAddress()
Returns the native address of the underlying native ByteBuffer getBuffer().
This class provides factory methods for generating AL and ALC objects.
static ALC getALC()
Get the default ALC object.
VersionNumberString getVersion()
Return the AL context implementation version.
String getVendor()
Return the AL context implementation vendor.
String getRenderer()
Return the AL context implementation renderer.
static JoalVersion getInstance()
StringBuilder toString(final ALC alc, StringBuilder sb)
Return JogampVersion package information and AL informal strings.
Testing the OpenAL version, comparing against expected OpenAL-Soft version >= 1.1....
static void main(final String args[])
void test03JoalVersionMustNoChangeContextAndDeviceUsed()
void test04JoalVersionMustNotSetAdditionalContext()
void alcDestroyContext(ALCcontext context)
Entry point (through function pointer) to C language function: void alcDestroyContext(ALCcontext * ...
boolean alcMakeContextCurrent(ALCcontext context)
Entry point (through function pointer) to C language function: ALCboolean alcMakeContextCurrent(ALC...
ALCcontext alcGetCurrentContext()
Entry point (through function pointer) to C language function: ALCcontext * alcGetCurrentContext()
boolean alcCloseDevice(ALCdevice device)
Entry point (through function pointer) to C language function: ALCboolean alcCloseDevice(ALCdevice ...
ALCdevice alcGetContextsDevice(ALCcontext context)
Entry point (through function pointer) to C language function: ALCdevice * alcGetContextsDevice(ALC...
ALCdevice alcOpenDevice(String devicename)
Entry point (through function pointer) to C language function: ALCdevice * alcOpenDevice(const ALCc...
ALCcontext alcCreateContext(ALCdevice device, IntBuffer attrlist)
Entry point (through function pointer) to C language function: ALCcontext * alcCreateContext(ALCdev...