Hey guys
I know there are topics with the same kind of problems, but the solutions couldn't solve my problems. I've started with OpenAL today and my audio just won't play. Code compiles fine without errors, but I hear nothing. OpenAL however returns error 40962 which is AL_INVALID_ENUM.
import util.*;
import jarmer.*;
import jarmer.core.*;
import jarmer.graphics.*;
import jarmer.input.*;
import jarmer.light.*;
import jarmer.math.*;
import java.io.*;
import java.nio.*;
import org.lwjgl.*;
import org.lwjgl.openal.*;
import org.lwjgl.openal.AL.*;
import org.lwjgl.openal.AL10.*;
import static org.lwjgl.openal.AL10.*;
public class Game {
private static IntBuffer buffer;
private static IntBuffer source;
private static FloatBuffer sourcePos;
private static FloatBuffer sourceVel;
private static FloatBuffer listenerPos;
private static FloatBuffer listenerVel;
private static FloatBuffer listenerOri;
public void run() {
//Initialize display
Window.create(640,480,false);
Sound snd = new Sound("spawn.wav");
snd.play();
System.out.println(alGetError());
//System.out.println(AL_INVALID_ENUM);
//Main loop
while (!Window.isClosed()) {
update();
render();
Window.update();
}
//Clean up
Window.destroy();
}
//Events
public void update() {
//Quit game with the ESC key
if (Keyboard.isKeyDown(Keys.escape)) {
Window.close();
}
}
public void render() {
}
}
The sound I'd like to play is attached.