28package com.jogamp.openal.test.junit;
30import java.io.IOException;
31import java.util.concurrent.atomic.AtomicInteger;
32import java.util.concurrent.atomic.AtomicReference;
34import org.junit.FixMethodOrder;
36import org.junit.After;
37import org.junit.Assert;
38import org.junit.runners.MethodSorters;
40import com.jogamp.openal.AL;
41import com.jogamp.openal.ALC;
42import com.jogamp.openal.ALCcontext;
43import com.jogamp.openal.ALCdevice;
44import com.jogamp.openal.ALExt;
45import com.jogamp.openal.ALExtConstants;
46import com.jogamp.openal.ALFactory;
47import com.jogamp.openal.sound3d.AudioSystem3D;
48import com.jogamp.openal.test.util.UITestCase;
49import com.jogamp.openal.util.ALHelpers;
54@FixMethodOrder(MethodSorters.NAME_ASCENDING)
69 System.err.println(
"makeCurrent() failed");
74 System.err.println(
"-----------------------------------------------------------------------------------------------------");
81 final AtomicInteger dbg_counter =
new AtomicInteger(0);
82 final AtomicReference<String> dbg_msg =
new AtomicReference<String>();
85 public void callback(
final int source,
final int type,
final int id,
final int severity,
final String message,
final ALCcontext userParam) {
86 final int count = dbg_counter.incrementAndGet();
90 System.err.println(
"AL-Debug["+count+
"]: src 0x"+Integer.toHexString(source)+
91 ", type 0x"+Integer.toHexString(type)+
93 ", severity 0x"+Integer.toHexString(severity)+
", msg '"+message+
"', ctx "+userParam);
96 final String expMessage =
"Test Message";
107 Assert.assertEquals(1, dbg_counter.get());
108 Assert.assertEquals(expMessage, dbg_msg.get());
119 if(
null != context) {
128 public static void main(
final String args[])
throws IOException {
This class provides factory methods for generating AL and ALC objects.
static AL getAL()
Get the default AL object.
static ALC getALC()
Get the default ALC object.
The AudioSystem3D class provides a set of methods for creating and manipulating a 3D audio environmen...
static final ALExt getALExt()
Return OpenAL global ALExt.
Testing the OpenAL-Soft Debug Extension.
static void main(final String args[])
static final String ALC_EXT_debug
static final String AL_EXT_debug
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...
boolean alcIsExtensionPresent(ALCdevice device, String extname)
Entry point (through function pointer) to C language function: ALCboolean alcIsExtensionPresent(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...
static final int AL_DEBUG_TYPE_OTHER_EXT
Define "AL_DEBUG_TYPE_OTHER_EXT" with expression '0x19C2', CType: int.
static final int AL_DEBUG_SOURCE_OTHER_EXT
Define "AL_DEBUG_SOURCE_OTHER_EXT" with expression '0x19B9', CType: int.
static final int ALC_CONTEXT_FLAGS_EXT
Define "ALC_CONTEXT_FLAGS_EXT" with expression '0x19CF', CType: int.
static final int AL_DEBUG_SOURCE_APPLICATION_EXT
Define "AL_DEBUG_SOURCE_APPLICATION_EXT" with expression '0x19B8', CType: int.
static final int AL_DEBUG_SEVERITY_NOTIFICATION_EXT
Define "AL_DEBUG_SEVERITY_NOTIFICATION_EXT" with expression '0x19C6', CType: int.
JavaCallback interface: ALDEBUGPROCEXT -> void (*ALDEBUGPROCEXT)(ALenum source, ALenum type,...
void alDebugMessageCallbackEXT(ALDEBUGPROCEXT callback, ALCcontext userParam)
Entry point (through function pointer) to C language function: void alDebugMessageCallbackEXT(ALDEB...
void alDebugMessageControlEXT(int source, int type, int severity, int count, IntBuffer ids, boolean enable)
Entry point (through function pointer) to C language function: void alDebugMessageControlEXT(ALenum...
void alDebugMessageInsertEXT(int source, int type, int id, int severity, String message)
Entry point (through function pointer) to C language function: void alDebugMessageInsertEXT(ALenum ...
boolean alIsExtensionPresent(String extname)
Entry point (through function pointer) to C language function: ALboolean alIsExtensionPresent(const...