mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Rotate audio listener by +90 degrees forward
This fixes wrong spatialization of 3D sources with HRTF
This commit is contained in:
parent
8cc1cd6f2c
commit
b95241dcfe
1 changed files with 8 additions and 6 deletions
|
@ -2250,12 +2250,14 @@ void S_OPENAL_Respatialize(int iEntNum, const vec3_t vHeadPos, const vec3_t vAxi
|
|||
//
|
||||
// Orientation
|
||||
//
|
||||
alorientation[0][0] = vAxis[0][0];
|
||||
alorientation[0][1] = vAxis[0][1];
|
||||
alorientation[0][2] = vAxis[0][2];
|
||||
alorientation[1][0] = vAxis[2][0];
|
||||
alorientation[1][1] = vAxis[2][1];
|
||||
alorientation[1][2] = vAxis[2][2];
|
||||
|
||||
// +90 degrees forward
|
||||
alorientation[0][0] = -vAxis[2][0];
|
||||
alorientation[0][1] = -vAxis[2][1];
|
||||
alorientation[0][2] = -vAxis[2][2];
|
||||
alorientation[1][0] = vAxis[0][0];
|
||||
alorientation[1][1] = vAxis[0][1];
|
||||
alorientation[1][2] = vAxis[0][2];
|
||||
qalListenerfv(AL_ORIENTATION, (const ALfloat *)alorientation);
|
||||
alDieIfError();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue