diff options
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALu.c | 2 | ||||
-rw-r--r-- | Alc/mixer.c | 5 |
2 files changed, 4 insertions, 3 deletions
@@ -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); } |