I believe you are right.
Use your code like
String deviceList = ALC10.alcGetString(null,ALC10.ALC_DEVICE_SPECIFIER);
System.out.println("Device["+deviceList+"]");
String captureDeviceList = ALC10.alcGetString(null,ALC11.ALC_CAPTURE_DEVICE_SPECIFIER);
System.out.println("Capture Device["+captureDeviceList+"]");
but have Exception in thread “main” java.lang.UnsatisfiedLinkError: org.lwjgl.openal.ALC10.nalcGetString(JI)Ljava/nio/ByteBuffer;
Problem with alcGetString, as you said before
Try to enumerate audio device
System.out.println("Default device: " + ALC10.alcGetString(null, ALC10.ALC_DEVICE_SPECIFIER));
if(ALC10.alcIsExtensionPresent(null, "ALC_ENUMERATION_EXT")) {
String[] devices = ALC10.alcGetString(null, ALC10.ALC_DEVICE_SPECIFIER).split("\0");
System.out.println("Available devices: ");
for(int i=0; i<devices.length; i++) {
System.out.println(i +": " + devices[i]);
}
}
result is:
Available devices: INFO 2016-04-05 16:45:58,309 SystemOut - Available devices:
0: OpenAL Soft INFO 2016-04-05 16:45:58,309 SystemOut - 0: OpenAL Soft
If use System.out.println("Default device: " + ALC10.alcGetString(null, ALC11.ALC_ALL_DEVICES_SPECIFIER)); insted System.out.println("Default device: " + ALC10.alcGetString(null, ALC10.ALC_DEVICE_SPECIFIER));
result is
Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: java.nio.charset.MalformedInputException: Input length = 1
at org.lwjgl.MemoryUtil.decodeImpl(MemoryUtil.java:336)
at org.lwjgl.MemoryUtil.decode(MemoryUtil.java:305)
at org.lwjgl.MemoryUtil.decodeUTF8(MemoryUtil.java:294)
at org.lwjgl.openal.ALC10.alcGetString(ALC10.java:157)
Test in condition when used 2 card’s (one sound usb). How to resolve this issue… ???