LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: runevision on September 27, 2004, 15:33:02

Title: OpenAL alDopplerVelocity has no effect?
Post by: runevision on September 27, 2004, 15:33:02
Using alDopplerVelocity(float) seems to do nothing. In Lesson 2 of the LWJGL OpenAL lessons, try to replace the loop with the code below to test the doppler effect. Then try to change the doppler velocity to other values. On my system, there's no difference. It's easier to hear the doppler effect if you use chimes.wav instead of Footsteps.wav. chimes.wav comes with lesson 5.

I have tried the exact equivalent code with JOAL and there it works fine - I get different doppler effects when I change the doppler velocity. But with the LWJGL implementation of OpenAL, I get no change at all... Thanks in advance for any help.


       // loop
       long starttime = System.currentTimeMillis();
       long time = 0;
       AL10.alSourcef(source.get(0), AL10.AL_PITCH, 1.0f);
       AL10.alDopplerVelocity(1.0f); // CHANGE HERE
       while(time<6000) {
           time = System.currentTimeMillis() - starttime;
           sourcePos.put(0, (float)(-3.0+0.001*(float)time) );
           sourcePos.put(1, 0.0f );
           sourcePos.put(2, 1.0f );
           sourceVel.put(0, 100.0f );
           sourceVel.put(1, 0.0f );
           sourceVel.put(2, 0.0f );
           AL10.alSource(source.get(0), AL10.AL_POSITION, sourcePos);
           AL10.alSource(source.get(0), AL10.AL_VELOCITY, sourceVel);
       }
       killALData();


Rune
Title: OpenAL alDopplerVelocity has no effect?
Post by: Matzon on September 27, 2004, 17:00:36
I get lots of change... 1 - 10 -100 -1000 I can hear lots of changes!
Title: OpenAL alDopplerVelocity has no effect?
Post by: runevision on September 27, 2004, 17:24:14
Quote from: "Matzon"I get lots of change... 1 - 10 -100 -1000 I can hear lots of changes!
That's very odd, because I really get none. How can I find out which version of OpenAL and LWJGL I'm using?

I get this from OpenAL32.dll:

Standard OpenAL(TM) Implementation
5.10.2879.0

And this from lwjglaudio.dll:
OpenAL32
0.0.9.9

lwjgl.dll has no version information.

Rune
Title: OpenAL alDopplerVelocity has no effect?
Post by: runevision on September 27, 2004, 18:11:24
I just got LWJGL 0.92 alpha but it's still the same. :(
Title: OpenAL alDopplerVelocity has no effect?
Post by: Matzon on September 27, 2004, 20:31:13
if possible, try to locate the wrap_oal.dll which is the actual OpenAL implementation (OpenAL32.dll is just a proxy dll).
Copy that file to the dir, and rename it to lwjglaudio.dll - same deal ?
Title: OpenAL alDopplerVelocity has no effect?
Post by: runevision on September 27, 2004, 20:45:48
Quote from: "Matzon"if possible, try to locate the wrap_oal.dll which is the actual OpenAL implementation (OpenAL32.dll is just a proxy dll).
Copy that file to the dir, and rename it to lwjglaudio.dll - same deal ?
Okay, I tried that, but it still makes no difference. (I am sure that it's now using the former wrap_oal.dll - now lwjglaudio.dll - because if I rename that file, I get an error.) But still no luck... :(

Rune
Title: sound card
Post by: middy on October 07, 2004, 08:32:52
What kind of sound card do you have.. eg you arnt sitting on a laptop or something :)
Title: Re: sound card
Post by: runevision on October 07, 2004, 12:53:49
Quote from: "middy"What kind of sound card do you have.. eg you arnt sitting on a laptop or something :)
Hmm...
VIA AC'97 Enhanced Audio Controller ?
If that isn't the information you need, let me know how I can find it.
No laptop anyway...

Rune