aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/panning.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-04-05 11:29:58 -0700
committerChris Robinson <[email protected]>2017-04-05 11:29:58 -0700
commitf76dea0c0321ebcc0f5a8838f1826309463cd2c1 (patch)
treee024ff6d69d45baae9dc733515799f443066dc49 /Alc/panning.c
parente7ca61e8b585d1546cb92ddcf0cfcd1fe084484c (diff)
Store the loaded hrtf entry container in the enumerated hrtf entry
Diffstat (limited to 'Alc/panning.c')
-rw-r--r--Alc/panning.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/Alc/panning.c b/Alc/panning.c
index ce86a561..aa8175d4 100644
--- a/Alc/panning.c
+++ b/Alc/panning.c
@@ -1150,20 +1150,22 @@ void aluInitRenderer(ALCdevice *device, ALint hrtf_id, enum HrtfRequestMode hrtf
if(hrtf_id >= 0 && (size_t)hrtf_id < VECTOR_SIZE(device->HrtfList))
{
- const HrtfEntry *entry = &VECTOR_ELEM(device->HrtfList, hrtf_id);
- if(entry->hrtf->sampleRate == device->Frequency)
+ const EnumeratedHrtf *entry = &VECTOR_ELEM(device->HrtfList, hrtf_id);
+ const struct Hrtf *hrtf = entry->hrtf->handle;
+ if(hrtf->sampleRate == device->Frequency)
{
- device->HrtfHandle = entry->hrtf;
+ device->HrtfHandle = hrtf;
alstr_copy(&device->HrtfName, entry->name);
}
}
for(i = 0;!device->HrtfHandle && i < VECTOR_SIZE(device->HrtfList);i++)
{
- const HrtfEntry *entry = &VECTOR_ELEM(device->HrtfList, i);
- if(entry->hrtf->sampleRate == device->Frequency)
+ const EnumeratedHrtf *entry = &VECTOR_ELEM(device->HrtfList, i);
+ const struct Hrtf *hrtf = entry->hrtf->handle;
+ if(hrtf->sampleRate == device->Frequency)
{
- device->HrtfHandle = entry->hrtf;
+ device->HrtfHandle = hrtf;
alstr_copy(&device->HrtfName, entry->name);
}
}