OpenAL alDopplerVelocity has no effect?

Started by runevision, September 27, 2004, 15:33:02

Previous topic - Next topic

runevision

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

Matzon

I get lots of change... 1 - 10 -100 -1000 I can hear lots of changes!

runevision

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

runevision

I just got LWJGL 0.92 alpha but it's still the same. :(

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 ?

runevision

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

middy

What kind of sound card do you have.. eg you arnt sitting on a laptop or something :)
um

runevision

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