diff options
author | Chris Robinson <[email protected]> | 2012-08-11 06:20:24 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-08-11 06:20:24 -0700 |
commit | 8304fc1bef0c23ebafe5ca1dbd9a54fc711584ca (patch) | |
tree | 88e0e5a1006890d8187e5d1225b923139ddc1953 | |
parent | ea84fee9527c5d55e7ecbd557d399b759b92aba4 (diff) |
Handle the scalar values a bit better
-rw-r--r-- | Alc/ALc.c | 4 | ||||
-rw-r--r-- | Alc/ALu.c | 8 |
2 files changed, 6 insertions, 6 deletions
@@ -755,11 +755,11 @@ static void alc_init(void) str = getenv("__ALSOFT_HALF_ANGLE_CONES"); if(str && (strcasecmp(str, "true") == 0 || strtol(str, NULL, 0) == 1)) - ConeScale = 1.0f; + ConeScale *= 0.5f; str = getenv("__ALSOFT_REVERSE_Z"); if(str && (strcasecmp(str, "true") == 0 || strtol(str, NULL, 0) == 1)) - ZScale = -1.0f; + ZScale *= -1.0f; pthread_key_create(&LocalContext, ReleaseThreadCtx); InitializeCriticalSection(&ListLock); @@ -43,7 +43,7 @@ struct ChanMap { }; /* Cone scalar */ -ALfloat ConeScale = 0.5f; +ALfloat ConeScale = 1.0f; /* Localized Z scalar for mono sources */ ALfloat ZScale = 1.0f; @@ -398,8 +398,8 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext) MinDist = ALSource->RefDistance; MaxDist = ALSource->MaxDistance; Rolloff = ALSource->RollOffFactor; - InnerAngle = ALSource->InnerAngle * ConeScale; - OuterAngle = ALSource->OuterAngle * ConeScale; + InnerAngle = ALSource->InnerAngle; + OuterAngle = ALSource->OuterAngle; AirAbsorptionFactor = ALSource->AirAbsorptionFactor; DryGainHFAuto = ALSource->DryGainHFAuto; WetGainAuto = ALSource->WetGainAuto; @@ -575,7 +575,7 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext) } /* Calculate directional soundcones */ - Angle = acosf(aluDotproduct(Direction,SourceToListener)) * (180.0f/F_PI); + Angle = acosf(aluDotproduct(Direction,SourceToListener)) * ConeScale * (360.0f/F_PI); if(Angle > InnerAngle && Angle <= OuterAngle) { ALfloat scale = (Angle-InnerAngle) / (OuterAngle-InnerAngle); |