aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/ALc.c7
-rw-r--r--Alc/ALu.c4
-rw-r--r--OpenAL32/Include/alMain.h2
3 files changed, 11 insertions, 2 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 2dbe52f9..dc781835 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -384,6 +384,9 @@ static ALint RTPrioLevel;
// Output Log File
static FILE *LogFile;
+// Cone scalar
+ALdouble ConeScale = 0.5;
+
///////////////////////////////////////////////////////
@@ -435,6 +438,10 @@ static void alc_init(void)
if(!LogFile)
LogFile = stderr;
+ str = getenv("__ALSOFT_HALF_ANGLE_CONES");
+ if(str && (strcasecmp(str, "true") == 0 || strtol(str, NULL, 0) == 1))
+ ConeScale = 1.0;
+
InitializeCriticalSection(&g_csMutex);
ALTHUNK_INIT();
ReadALConfig();
diff --git a/Alc/ALu.c b/Alc/ALu.c
index ea5a0319..49cedab8 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -357,8 +357,8 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
MinDist = ALSource->flRefDistance;
MaxDist = ALSource->flMaxDistance;
Rolloff = ALSource->flRollOffFactor;
- InnerAngle = ALSource->flInnerAngle * 0.5f;
- OuterAngle = ALSource->flOuterAngle * 0.5f;
+ InnerAngle = ALSource->flInnerAngle * ConeScale;
+ OuterAngle = ALSource->flOuterAngle * ConeScale;
OuterGainHF = ALSource->OuterGainHF;
AirAbsorptionFactor = ALSource->AirAbsorptionFactor;
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index 9aad3036..eab68070 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -583,6 +583,8 @@ void al_print(const char *fname, unsigned int line, const char *fmt, ...)
PRINTF_STYLE(3,4);
#define AL_PRINT(...) al_print(__FILE__, __LINE__, __VA_ARGS__)
+extern ALdouble ConeScale;
+
#ifdef __cplusplus
}
#endif