aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALu.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 80fb1d1a..07eb9315 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -158,7 +158,21 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
switch(Channels)
{
case FmtMono:
- SrcMatrix[0][FRONT_CENTER] = DryGain * ListenerGain;
+ if((ALContext->Device->Flags&DEVICE_USE_HRTF))
+ {
+ const ALshort *hrtf_left, *hrtf_right;
+
+ GetHrtfCoeffs(0.0, 0.0, &hrtf_left, &hrtf_right);
+ for(i = 0;i < HRTF_LENGTH;i++)
+ {
+ ALSource->Params.HrtfCoeffs[0][i][0] =
+ hrtf_left[i]*(1.0/32767.0)*DryGain*ListenerGain;
+ ALSource->Params.HrtfCoeffs[0][i][1] =
+ hrtf_right[i]*(1.0/32767.0)*DryGain*ListenerGain;
+ }
+ }
+ else
+ SrcMatrix[0][FRONT_CENTER] = DryGain * ListenerGain;
break;
case FmtStereo:
if((ALContext->Device->Flags&DEVICE_USE_HRTF))