summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/ALu.c2
-rw-r--r--CMakeLists.txt3
-rw-r--r--OpenAL32/Include/alu.h6
-rw-r--r--config.h.in3
4 files changed, 12 insertions, 2 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 07d5fc19..76a987aa 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -716,7 +716,7 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
// Calculate elevation and azimuth only when the source is not at
// the listener. This prevents +0 and -0 Z from producing
// inconsistent panning.
- ev = asin(Position[1]);
+ ev = aluAsin(Position[1]);
az = atan2(Position[0], -Position[2]*ZScale);
}
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 21e9189d..4909a985 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -228,12 +228,13 @@ CHECK_LIBRARY_EXISTS(m sqrtf "" HAVE_SQRTF)
CHECK_LIBRARY_EXISTS(m cosf "" HAVE_COSF)
CHECK_LIBRARY_EXISTS(m sinf "" HAVE_SINF)
CHECK_LIBRARY_EXISTS(m acosf "" HAVE_ACOSF)
+CHECK_LIBRARY_EXISTS(m asinf "" HAVE_ASINF)
CHECK_LIBRARY_EXISTS(m atanf "" HAVE_ATANF)
CHECK_LIBRARY_EXISTS(m fabsf "" HAVE_FABSF)
IF(HAVE_FENV_H)
CHECK_LIBRARY_EXISTS(m fesetround "" HAVE_FESETROUND)
ENDIF()
-IF(HAVE_SQRTF OR HAVE_COSF OR HAVE_SINF OR HAVE_ACOSF OR HAVE_ATANF OR HAVE_FABSF OR HAVE_FESETROUND)
+IF(HAVE_SQRTF OR HAVE_COSF OR HAVE_SINF OR HAVE_ACOSF OR HAVE_ASINF OR HAVE_ATANF OR HAVE_FABSF OR HAVE_FESETROUND)
SET(EXTRA_LIBS m ${EXTRA_LIBS})
ENDIF()
CHECK_FUNCTION_EXISTS(strtof HAVE_STRTOF)
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index a62ca1c5..f041ffc5 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -52,6 +52,12 @@
#define aluAcos(x) ((ALfloat)acos((double)(x)))
#endif
+#ifdef HAVE_ASINF
+#define aluAsin(x) (asinf((x)))
+#else
+#define aluAsin(x) ((ALfloat)asin((double)(x)))
+#endif
+
#ifdef HAVE_ATANF
#define aluAtan(x) (atanf((x)))
#else
diff --git a/config.h.in b/config.h.in
index b6c945a5..645e4208 100644
--- a/config.h.in
+++ b/config.h.in
@@ -62,6 +62,9 @@
/* Define if we have the acosf function */
#cmakedefine HAVE_ACOSF
+/* Define if we have the asinf function */
+#cmakedefine HAVE_ASINF
+
/* Define if we have the atanf function */
#cmakedefine HAVE_ATANF