mirror of
https://github.com/lubosz/overte.git
synced 2025-04-08 08:22:19 +02:00
Fix illegal instruction in libaudio.dylib on OSX
This file gets included by AudioHRTF_avx512.cpp, which contains code that should only be getting executed on CPUs with the appropriate support. Unfortunately, when that file is compiled with -mavx512f, GCC also generates AVX instructions in the code that initializes the value of SQUARE_ROOT_OF_2, and this crashes on CPUs without AVX because it runs unconditionally. Avoid the issue entirely by just making it a constant so no code needs to be run.
This commit is contained in:
parent
f6ee158731
commit
bc2c6a280d
1 changed files with 2 additions and 2 deletions
|
@ -28,8 +28,8 @@ const float ARCSECONDS_PER_ARCMINUTE = 60.0f;
|
|||
const float ARCSECONDS_PER_DEGREE = ARCMINUTES_PER_DEGREE * ARCSECONDS_PER_ARCMINUTE;
|
||||
|
||||
const float EPSILON = 0.000001f; //smallish positive number - used as margin of error for some computations
|
||||
const float SQUARE_ROOT_OF_2 = (float)sqrt(2.0f);
|
||||
const float SQUARE_ROOT_OF_3 = (float)sqrt(3.0f);
|
||||
const float SQUARE_ROOT_OF_2 = 1.414214f;
|
||||
const float SQUARE_ROOT_OF_3 = 1.732051f;
|
||||
const float METERS_PER_DECIMETER = 0.1f;
|
||||
const float METERS_PER_CENTIMETER = 0.01f;
|
||||
const float METERS_PER_MILLIMETER = 0.001f;
|
||||
|
|
Loading…
Reference in a new issue