I have tried to use capturing with this code:
ALut.alutInit();
AL al = ALFactory.getAL();
ALC alc = ALFactory.getALC();
int size = 4010;
byte[] buffer = new byte[size];
ALCdevice device =
alc.alcCaptureOpenDevice(buffer, 22050, AL.AL_FORMAT_MONO16, size, 0);
int error = alc.alcGetError(device);
System.out.println("Error ?: " + alc.alcGetString(null, alc.alcGetError(device)));
.....
But I got a Invalid Device Error. The question is whether the parameters for the mehtod alcCaptureOpenDevice are correct. There is no way to define a device in this method. In the OpenAL 1.1 Spec parameters looks like this:
ALCdevice* alcCaptureOpenDevice(const ALCchar *deviceName, ALCuint freq, ALCenum fmt, ALCsizei bufsize);
and in JOAL:
alcCaptureOpenDevice(byte[], int0, int1, int2, int3) (a parameter for deviceName is missing)
What should I do to get this work? I hope its not a bug…