aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-09-24 18:46:41 -0700
committerChris Robinson <[email protected]>2016-09-24 18:46:41 -0700
commitf5e4a3ed85993f479c6cc1a967d5252378eb5211 (patch)
treeac45d22c3f4ea5e4df0ffef5720b09ee840c1ac4 /Alc/ALu.c
parent24f9a0f2aed5b0770af1633ab4a2e2832462294e (diff)
Add a volume-adjust config option to adjust the source output volume
Designed for apps that either don't change the listener's AL_GAIN, or don't allow the listener's AL_GAIN to go above 1. This allows the volume to still be increased further than such apps may allow, if users find it too quiet. Be aware that increasing this can easily cause clipping. The gain limit reported by AL_GAIN_LIMIT_SOFT is also affected by this.
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index f93781df..13aff5d9 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -278,7 +278,7 @@ static ALboolean CalcListenerParams(ALCcontext *Context)
0.0f);
Listener->Params.Velocity = aluMatrixfVector(&Listener->Params.Matrix, &vel);
- Listener->Params.Gain = ATOMIC_LOAD(&props->Gain, almemory_order_relaxed);
+ Listener->Params.Gain = ATOMIC_LOAD(&props->Gain, almemory_order_relaxed) * Context->GainBoost;
Listener->Params.MetersPerUnit = ATOMIC_LOAD(&props->MetersPerUnit, almemory_order_relaxed);
Listener->Params.DopplerFactor = ATOMIC_LOAD(&props->DopplerFactor, almemory_order_relaxed);