]> git.mxchange.org Git - simgear.git/commitdiff
Don't forget to apply the doppler adjustment factor to the listener velocity also
authorehofman <ehofman>
Mon, 23 Nov 2009 11:54:33 +0000 (11:54 +0000)
committerTim Moore <timoore@redhat.com>
Tue, 24 Nov 2009 13:17:54 +0000 (14:17 +0100)
simgear/sound/soundmgr_openal.cxx

index ce415e295a5644be753076bc02b19bd88ab64df1..531298ae2342345c1e113fd952d51be3ed9c9641 100644 (file)
@@ -277,6 +277,11 @@ if (isNaN(_velocity.data())) printf("NaN in listener velocity\n");
             if ( _velocity[0] || _velocity[1] || _velocity[2] ) {
                 velocity = hlOr.backTransform(_velocity*SG_FEET_TO_METER);
             }
+
+            if ( _bad_doppler ) {
+                velocity *= 100.0f;
+            }
+
             alListenerfv( AL_VELOCITY, toVec3f(velocity).data() );
             // alDopplerVelocity(340.3);       // TODO: altitude dependent
             testForALError("update");