From 5f5eebc4df536daef7f68d02f7a0c751c8dc0f79 Mon Sep 17 00:00:00 2001 From: Chris Robinson <chris.kcat@gmail.com> Date: Sun, 20 Sep 2015 04:10:21 -0700 Subject: Allow the hrtf_tables option to be device-specific --- Alc/ALc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Alc/ALc.c') diff --git a/Alc/ALc.c b/Alc/ALc.c index d43b587c..6c963bf3 100644 --- a/Alc/ALc.c +++ b/Alc/ALc.c @@ -1924,7 +1924,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) if(hrtf_userreq == Hrtf_Enable || (hrtf_userreq != Hrtf_Disable && hrtf_appreq == Hrtf_Enable)) { - if(FindHrtfFormat(&device->FmtChans, &device->Frequency)) + if(FindHrtfFormat(device->DeviceName, &device->FmtChans, &device->Frequency)) device->Flags |= DEVICE_CHANNELS_REQUEST | DEVICE_FREQUENCY_REQUEST; else { @@ -1937,7 +1937,8 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) { enum DevFmtChannels chans = device->FmtChans; ALCuint freq = device->Frequency; - if(!FindHrtfFormat(&chans, &freq) || chans != device->FmtChans || freq != device->Frequency) + if(!FindHrtfFormat(device->DeviceName, &chans, &freq) || + chans != device->FmtChans || freq != device->Frequency) { ERR("Requested format not HRTF compatible: %s, %uhz\n", DevFmtChannelsString(device->FmtChans), device->Frequency); @@ -2057,7 +2058,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) else { device->Hrtf_Status = ALC_HRTF_UNSUPPORTED_FORMAT_SOFT; - device->Hrtf = GetHrtf(device->FmtChans, device->Frequency); + device->Hrtf = GetHrtf(device->DeviceName, device->FmtChans, device->Frequency); } if(device->Hrtf) { -- cgit v1.2.3