summaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-11-29 03:32:25 -0800
committerChris Robinson <[email protected]>2014-11-29 03:32:25 -0800
commit0c74a14543a100430517838e147696f1de0de738 (patch)
treec65d1e90bc7a4e1414808b416525be0fa0af234f /Alc
parentcf50f44f4d23f9c7d04815f41dada3357d568f2b (diff)
Remove IrSize from DirectParams
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALu.c2
-rw-r--r--Alc/mixer.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 826e7b3a..0f158b6c 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -589,7 +589,6 @@ ALvoid CalcNonAttnSourceParams(ALvoice *voice, const ALsource *ALSource, const A
}
voice->Direct.Counter = 0;
voice->Direct.Moving = AL_TRUE;
- voice->Direct.Hrtf.IrSize = GetHrtfIrSize(Device->Hrtf);
voice->IsHrtf = AL_TRUE;
}
@@ -1065,7 +1064,6 @@ ALvoid CalcSourceParams(ALvoice *voice, const ALsource *ALSource, const ALCconte
voice->Direct.LastDir[1] = dir[1];
voice->Direct.LastDir[2] = dir[2];
}
- voice->Direct.Hrtf.IrSize = GetHrtfIrSize(Device->Hrtf);
voice->IsHrtf = AL_TRUE;
}
diff --git a/Alc/mixer.c b/Alc/mixer.c
index 3f80434e..ae049ac8 100644
--- a/Alc/mixer.c
+++ b/Alc/mixer.c
@@ -192,6 +192,7 @@ ALvoid MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALuint Sam
ALuint NumChannels;
ALuint SampleSize;
ALint64 DataSize64;
+ ALuint IrSize;
ALuint chan, j;
/* Get source info */
@@ -217,6 +218,8 @@ ALvoid MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALuint Sam
BufferListItem = BufferListItem->next;
}
+ IrSize = (Device->Hrtf ? GetHrtfIrSize(Device->Hrtf) : 0);
+
Mix = SelectMixer();
HrtfMix = SelectHrtfMixer();
Resample = ((increment == FRACTIONONE && DataPosFrac == 0) ?
@@ -436,7 +439,7 @@ ALvoid MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALuint Sam
parms->Counter, OutPos, DstBufferSize);
else
HrtfMix(parms->OutBuffer, samples, parms->Counter, voice->Offset,
- OutPos, parms->Hrtf.IrSize, &parms->Hrtf.Params[chan],
+ OutPos, IrSize, &parms->Hrtf.Params[chan],
&parms->Hrtf.State[chan], DstBufferSize);
}