diff options
-rw-r--r-- | Alc/ALu.c | 2 | ||||
-rw-r--r-- | Alc/mixer.c | 5 | ||||
-rw-r--r-- | OpenAL32/Include/alu.h | 1 |
3 files changed, 4 insertions, 4 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); } diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h index f4871413..257f0c8f 100644 --- a/OpenAL32/Include/alu.h +++ b/OpenAL32/Include/alu.h @@ -77,7 +77,6 @@ typedef struct DirectParams { struct { HrtfParams Params[MAX_INPUT_CHANNELS]; HrtfState State[MAX_INPUT_CHANNELS]; - ALuint IrSize; } Hrtf; MixGains Gains[MAX_INPUT_CHANNELS][MAX_OUTPUT_CHANNELS]; } DirectParams; |