I tried to use AL11.alSpeedOfSound() but it throws an unsatisfied link error on Linux (Ubuntu 9.04) and Windows XP SP3, both 32 bit. On Windows I also get a message dialog saying that the app tried to read some memory address and failed. LWJGL version is 2.1.0.
alSpeedOfSound is a new function in OpenAL 1.1. It's inteded to replace alDopplerVerlocity.
Test code:
import org.lwjgl.LWJGLException;
import org.lwjgl.openal.AL;
import org.lwjgl.openal.AL10;
import org.lwjgl.openal.AL11;
public class SpeedOfSoundSet {
public static void main(final String[] args) throws LWJGLException {
if (!AL.isCreated()) {
AL.create();
}
AL10.alDopplerVelocity(100f); // Works
AL11.alSpeedOfSound(343.3f); // Throws UnsatisfiedLinkError
}
}
Eception:
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.lwjgl.openal.AL11.nalSpeedOfSound(F)V
at org.lwjgl.openal.AL11.nalSpeedOfSound(Native Method)
at org.lwjgl.openal.AL11.alSpeedOfSound(AL11.java:281)
at de.ciardhubh.lwjgltest.openal.SpeedOfSoundSet.main(SpeedOfSoundSet.java:14)
Which version of OpenAL does LWJGL support? 1.0 or 1.1? There's the class AL11 so I assume 1.1 is supported. Then again, there is this wiki page that say only 1.0 is supported:
http://lwjgl.org/wiki/doku.php/lwjgl/tutorials/openal/index . If it's 1.1, the Javadoc of alDopplerFactor/Velocity is probably also outdate as it mentions the old 1.0 doppler funtions.