}
ALCdevice d = alc.alcOpenDevice(deviceName);
if (d == null) {
throw new ALException("Error opening default OpenAL device");
}
ALCcontext c = alc.alcCreateContext(d, null);
if (c == null) {
alc.alcCloseDevice(d);
throw new ALException("Error creating OpenAL context");
}
alc.alcMakeContextCurrent(c);