diff options
author | Chris Robinson <[email protected]> | 2016-07-07 10:26:42 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-07-07 10:26:42 -0700 |
commit | 7ec89b4b6e787c9bb0b73aea7f736351f1b0bfca (patch) | |
tree | b12b9da8d160048f7aaa8da8d4e8eb9cef2daecd /Alc/ALc.c | |
parent | b495d80f5624328569bd0d8b9478927c0fc32100 (diff) |
Avoid function calls to get the HRTF sample rate and IR size
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r-- | Alc/ALc.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; } } |