Hi
I’ve encountered a problem with using OpenAL. When I run my program, it shows a black screen for a second then outputs the following error file. I’m using LWJGL 2.9.3 on Mac OS X Yosemite. My OpenAL code looks like this.
public static void playAudio() {
WaveData data;
try {
data = WaveData.create(new BufferedInputStream(
new FileInputStream("forrest.wav")));
int buffer = alGenBuffers();
alBufferData(buffer, data.format, data.data, data.samplerate);
data.dispose();
int source = alGenSources();
alSourcei(source, AL_BUFFER, buffer);
alSourcePlay(source);
alDeleteBuffers(buffer);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}
Can anyone shed some light on this problem?
Thanks, DarkCart