aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-07-07 10:26:42 -0700
committerChris Robinson <[email protected]>2016-07-07 10:26:42 -0700
commit7ec89b4b6e787c9bb0b73aea7f736351f1b0bfca (patch)
treeb12b9da8d160048f7aaa8da8d4e8eb9cef2daecd /Alc/ALc.c
parentb495d80f5624328569bd0d8b9478927c0fc32100 (diff)
Avoid function calls to get the HRTF sample rate and IR size
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c6
1 files changed, 3 insertions, 3 deletions
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;
}
}