Audaspace: Fixing quaternion and relativeness of 3D sounds error.
authorJoerg Mueller <nexyon@gmail.com>
Mon, 16 Aug 2010 14:55:45 +0000 (14:55 +0000)
committerJoerg Mueller <nexyon@gmail.com>
Mon, 16 Aug 2010 14:55:45 +0000 (14:55 +0000)
intern/audaspace/intern/AUD_C-API.cpp
source/gameengine/Ketsji/KX_SoundActuator.cpp

index a12478ab4777dd0588b5ece84e314ad03c2d5487..a0c56257228a1f877131363fe788ae96a87eab18 100644 (file)
@@ -474,7 +474,7 @@ int AUD_setListenerOrientation(const float* orientation)
 
        if(AUD_3ddevice)
        {
-               AUD_Quaternion q(orientation[0], orientation[1], orientation[2], orientation[3]);
+               AUD_Quaternion q(orientation[3], orientation[0], orientation[1], orientation[2]);
                AUD_3ddevice->setListenerOrientation(q);
                return true;
        }
@@ -556,7 +556,7 @@ int AUD_setSourceOrientation(AUD_Channel* handle, const float* orientation)
 
        if(AUD_3ddevice)
        {
-               AUD_Quaternion q(orientation[0], orientation[1], orientation[2], orientation[3]);
+               AUD_Quaternion q(orientation[3], orientation[0], orientation[1], orientation[2]);
                return AUD_3ddevice->setSourceOrientation(handle, q);
        }
 
index 09ad567117f1759959b0750552d427e4b018a759..9ebb36578c447d1a61dcdd1d57470e2db8e34602 100644 (file)
@@ -102,7 +102,7 @@ void KX_SoundActuator::play()
                // sound shall be played 3D
                m_handle = AUD_play(sound, 0);
 
-               AUD_setRelative(m_handle, true);
+               AUD_setRelative(m_handle, false);
                AUD_setVolumeMaximum(m_handle, m_3d.max_gain);
                AUD_setVolumeMinimum(m_handle, m_3d.min_gain);
                AUD_setDistanceReference(m_handle, m_3d.reference_distance);