From: ehofman Date: Mon, 23 Nov 2009 11:54:33 +0000 (+0000) Subject: Don't forget to apply the doppler adjustment factor to the listener velocity also X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=878288f06a48db9330fa8b80e8e2db955b50b244;p=simgear.git Don't forget to apply the doppler adjustment factor to the listener velocity also --- diff --git a/simgear/sound/soundmgr_openal.cxx b/simgear/sound/soundmgr_openal.cxx index ce415e29..531298ae 100644 --- a/simgear/sound/soundmgr_openal.cxx +++ b/simgear/sound/soundmgr_openal.cxx @@ -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");