From 7ec89b4b6e787c9bb0b73aea7f736351f1b0bfca Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 7 Jul 2016 10:26:42 -0700 Subject: Avoid function calls to get the HRTF sample rate and IR size --- Alc/ALc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Alc/ALc.c') diff --git a/Alc/ALc.c b/Alc/ALc.c index c50f0b25..bc6304d7 100644 --- a/Alc/ALc.c +++ b/Alc/ALc.c @@ -1906,9 +1906,9 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) { device->FmtChans = DevFmtStereo; if(hrtf_id >= 0 && (size_t)hrtf_id < VECTOR_SIZE(device->Hrtf_List)) - device->Frequency = GetHrtfSampleRate(VECTOR_ELEM(device->Hrtf_List, hrtf_id).hrtf); + device->Frequency = VECTOR_ELEM(device->Hrtf_List, hrtf_id).hrtf->sampleRate; else - device->Frequency = GetHrtfSampleRate(VECTOR_ELEM(device->Hrtf_List, 0).hrtf); + device->Frequency = VECTOR_ELEM(device->Hrtf_List, 0).hrtf->sampleRate; device->Flags |= DEVICE_CHANNELS_REQUEST | DEVICE_FREQUENCY_REQUEST; } else @@ -1937,7 +1937,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) for(i = 0;i < VECTOR_SIZE(device->Hrtf_List);i++) { const struct Hrtf *hrtf = VECTOR_ELEM(device->Hrtf_List, i).hrtf; - if(GetHrtfSampleRate(hrtf) == device->Frequency) + if(hrtf->sampleRate == device->Frequency) break; } } -- cgit v1.2.3