diff options
author | Chris Robinson <[email protected]> | 2017-04-05 11:29:58 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-04-05 11:29:58 -0700 |
commit | f76dea0c0321ebcc0f5a8838f1826309463cd2c1 (patch) | |
tree | e024ff6d69d45baae9dc733515799f443066dc49 /Alc/ALc.c | |
parent | e7ca61e8b585d1546cb92ddcf0cfcd1fe084484c (diff) |
Store the loaded hrtf entry container in the enumerated hrtf entry
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r-- | Alc/ALc.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -2056,11 +2056,11 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) } if(VECTOR_SIZE(device->HrtfList) > 0) { - device->FmtChans = DevFmtStereo; + const struct Hrtf *hrtf = VECTOR_ELEM(device->HrtfList, 0).hrtf->handle; if(hrtf_id >= 0 && (size_t)hrtf_id < VECTOR_SIZE(device->HrtfList)) - device->Frequency = VECTOR_ELEM(device->HrtfList, hrtf_id).hrtf->sampleRate; - else - device->Frequency = VECTOR_ELEM(device->HrtfList, 0).hrtf->sampleRate; + hrtf = VECTOR_ELEM(device->HrtfList, hrtf_id).hrtf->handle; + device->FmtChans = DevFmtStereo; + device->Frequency = hrtf->sampleRate; device->Flags |= DEVICE_CHANNELS_REQUEST | DEVICE_FREQUENCY_REQUEST; } else @@ -2088,7 +2088,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) } for(i = 0;i < VECTOR_SIZE(device->HrtfList);i++) { - const struct Hrtf *hrtf = VECTOR_ELEM(device->HrtfList, i).hrtf; + const struct Hrtf *hrtf = VECTOR_ELEM(device->HrtfList, i).hrtf->handle; if(hrtf->sampleRate == device->Frequency) break; } |