aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c78
1 files changed, 39 insertions, 39 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index e393a181..15614dd1 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1923,7 +1923,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
/*************************************************************************
* Update device format request if HRTF is requested
*/
- device->Hrtf_Status = ALC_HRTF_DISABLED_SOFT;
+ device->Hrtf.Status = ALC_HRTF_DISABLED_SOFT;
if(device->Type != Loopback)
{
const char *hrtf;
@@ -1939,31 +1939,31 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
if(hrtf_userreq == Hrtf_Enable || (hrtf_userreq != Hrtf_Disable && hrtf_appreq == Hrtf_Enable))
{
- if(VECTOR_SIZE(device->Hrtf_List) == 0)
+ if(VECTOR_SIZE(device->Hrtf.List) == 0)
{
- VECTOR_DEINIT(device->Hrtf_List);
- device->Hrtf_List = EnumerateHrtf(device->DeviceName);
+ VECTOR_DEINIT(device->Hrtf.List);
+ device->Hrtf.List = EnumerateHrtf(device->DeviceName);
}
- if(VECTOR_SIZE(device->Hrtf_List) > 0)
+ if(VECTOR_SIZE(device->Hrtf.List) > 0)
{
device->FmtChans = DevFmtStereo;
- if(hrtf_id >= 0 && (size_t)hrtf_id < VECTOR_SIZE(device->Hrtf_List))
- device->Frequency = VECTOR_ELEM(device->Hrtf_List, hrtf_id).hrtf->sampleRate;
+ if(hrtf_id >= 0 && (size_t)hrtf_id < VECTOR_SIZE(device->Hrtf.List))
+ device->Frequency = VECTOR_ELEM(device->Hrtf.List, hrtf_id).hrtf->sampleRate;
else
- device->Frequency = VECTOR_ELEM(device->Hrtf_List, 0).hrtf->sampleRate;
+ device->Frequency = VECTOR_ELEM(device->Hrtf.List, 0).hrtf->sampleRate;
device->Flags |= DEVICE_CHANNELS_REQUEST | DEVICE_FREQUENCY_REQUEST;
}
else
{
hrtf_userreq = Hrtf_Default;
hrtf_appreq = Hrtf_Disable;
- device->Hrtf_Status = ALC_HRTF_UNSUPPORTED_FORMAT_SOFT;
+ device->Hrtf.Status = ALC_HRTF_UNSUPPORTED_FORMAT_SOFT;
}
}
}
else if(hrtf_appreq == Hrtf_Enable)
{
- size_t i = VECTOR_SIZE(device->Hrtf_List);
+ size_t i = VECTOR_SIZE(device->Hrtf.List);
/* Loopback device. We don't need to match to a specific HRTF entry
* here. If the requested ID matches, we'll pick that later, if not,
* we'll try to auto-select one anyway. Just make sure one exists
@@ -1971,24 +1971,24 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
*/
if(device->FmtChans == DevFmtStereo)
{
- if(VECTOR_SIZE(device->Hrtf_List) == 0)
+ if(VECTOR_SIZE(device->Hrtf.List) == 0)
{
- VECTOR_DEINIT(device->Hrtf_List);
- device->Hrtf_List = EnumerateHrtf(device->DeviceName);
+ VECTOR_DEINIT(device->Hrtf.List);
+ device->Hrtf.List = EnumerateHrtf(device->DeviceName);
}
- for(i = 0;i < VECTOR_SIZE(device->Hrtf_List);i++)
+ for(i = 0;i < VECTOR_SIZE(device->Hrtf.List);i++)
{
- const struct Hrtf *hrtf = VECTOR_ELEM(device->Hrtf_List, i).hrtf;
+ const struct Hrtf *hrtf = VECTOR_ELEM(device->Hrtf.List, i).hrtf;
if(hrtf->sampleRate == device->Frequency)
break;
}
}
- if(i == VECTOR_SIZE(device->Hrtf_List))
+ if(i == VECTOR_SIZE(device->Hrtf.List))
{
ERR("Requested format not HRTF compatible: %s, %uhz\n",
DevFmtChannelsString(device->FmtChans), device->Frequency);
hrtf_appreq = Hrtf_Disable;
- device->Hrtf_Status = ALC_HRTF_UNSUPPORTED_FORMAT_SOFT;
+ device->Hrtf.Status = ALC_HRTF_UNSUPPORTED_FORMAT_SOFT;
}
}
@@ -2043,7 +2043,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
size = device->Dry.NumChannels * sizeof(device->Dry.Buffer[0]);
if((device->AmbiDecoder && bformatdec_getOrder(device->AmbiDecoder) >= 2))
size += (ChannelsFromDevFmt(device->FmtChans)+4) * sizeof(device->Dry.Buffer[0]);
- else if(device->Hrtf || device->Uhj_Encoder || device->AmbiDecoder)
+ else if(device->Hrtf.Handle || device->Uhj_Encoder || device->AmbiDecoder)
size += ChannelsFromDevFmt(device->FmtChans) * sizeof(device->Dry.Buffer[0]);
else if(device->FmtChans > DevFmtAmbi1 && device->FmtChans <= DevFmtAmbi3)
size += 4 * sizeof(device->Dry.Buffer[0]);
@@ -2054,7 +2054,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
return ALC_INVALID_DEVICE;
}
- if(device->Hrtf || device->Uhj_Encoder || device->AmbiDecoder)
+ if(device->Hrtf.Handle || device->Uhj_Encoder || device->AmbiDecoder)
{
device->RealOut.Buffer = device->Dry.Buffer + device->Dry.NumChannels;
device->RealOut.NumChannels = ChannelsFromDevFmt(device->FmtChans);
@@ -2204,8 +2204,8 @@ static ALCvoid FreeDevice(ALCdevice *device)
}
ResetUIntMap(&device->FilterMap);
- AL_STRING_DEINIT(device->Hrtf_Name);
- FreeHrtfList(&device->Hrtf_List);
+ AL_STRING_DEINIT(device->Hrtf.Name);
+ FreeHrtfList(&device->Hrtf.List);
al_free(device->Bs2b);
device->Bs2b = NULL;
@@ -2683,7 +2683,7 @@ ALC_API const ALCchar* ALC_APIENTRY alcGetString(ALCdevice *Device, ALCenum para
else
{
almtx_lock(&Device->BackendLock);
- value = (Device->Hrtf ? al_string_get_cstr(Device->Hrtf_Name) : "");
+ value = (Device->Hrtf.Handle ? al_string_get_cstr(Device->Hrtf.Name) : "");
almtx_unlock(&Device->BackendLock);
ALCdevice_DecRef(Device);
}
@@ -2824,10 +2824,10 @@ static ALCsizei GetIntegerv(ALCdevice *device, ALCenum param, ALCsizei size, ALC
values[i++] = device->NumAuxSends;
values[i++] = ALC_HRTF_SOFT;
- values[i++] = (device->Hrtf ? ALC_TRUE : ALC_FALSE);
+ values[i++] = (device->Hrtf.Handle ? ALC_TRUE : ALC_FALSE);
values[i++] = ALC_HRTF_STATUS_SOFT;
- values[i++] = device->Hrtf_Status;
+ values[i++] = device->Hrtf.Status;
almtx_unlock(&device->BackendLock);
values[i++] = 0;
@@ -2892,18 +2892,18 @@ static ALCsizei GetIntegerv(ALCdevice *device, ALCenum param, ALCsizei size, ALC
return 1;
case ALC_HRTF_SOFT:
- values[0] = (device->Hrtf ? ALC_TRUE : ALC_FALSE);
+ values[0] = (device->Hrtf.Handle ? ALC_TRUE : ALC_FALSE);
return 1;
case ALC_HRTF_STATUS_SOFT:
- values[0] = device->Hrtf_Status;
+ values[0] = device->Hrtf.Status;
return 1;
case ALC_NUM_HRTF_SPECIFIERS_SOFT:
almtx_lock(&device->BackendLock);
- FreeHrtfList(&device->Hrtf_List);
- device->Hrtf_List = EnumerateHrtf(device->DeviceName);
- values[0] = (ALCint)VECTOR_SIZE(device->Hrtf_List);
+ FreeHrtfList(&device->Hrtf.List);
+ device->Hrtf.List = EnumerateHrtf(device->DeviceName);
+ values[0] = (ALCint)VECTOR_SIZE(device->Hrtf.List);
almtx_unlock(&device->BackendLock);
return 1;
@@ -2994,10 +2994,10 @@ ALC_API void ALC_APIENTRY alcGetInteger64vSOFT(ALCdevice *device, ALCenum pname,
values[i++] = device->NumAuxSends;
values[i++] = ALC_HRTF_SOFT;
- values[i++] = (device->Hrtf ? ALC_TRUE : ALC_FALSE);
+ values[i++] = (device->Hrtf.Handle ? ALC_TRUE : ALC_FALSE);
values[i++] = ALC_HRTF_STATUS_SOFT;
- values[i++] = device->Hrtf_Status;
+ values[i++] = device->Hrtf.Status;
clock = V0(device->Backend,getClockLatency)();
values[i++] = ALC_DEVICE_CLOCK_SOFT;
@@ -3403,8 +3403,8 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName)
device->Flags = 0;
device->Bs2b = NULL;
device->Uhj_Encoder = NULL;
- VECTOR_INIT(device->Hrtf_List);
- AL_STRING_INIT(device->Hrtf_Name);
+ VECTOR_INIT(device->Hrtf.List);
+ AL_STRING_INIT(device->Hrtf.Name);
device->Render_Mode = NormalRender;
AL_STRING_INIT(device->DeviceName);
device->Dry.Buffer = NULL;
@@ -3683,8 +3683,8 @@ ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *deviceName,
device->Connected = ALC_TRUE;
device->Type = Capture;
- VECTOR_INIT(device->Hrtf_List);
- AL_STRING_INIT(device->Hrtf_Name);
+ VECTOR_INIT(device->Hrtf.List);
+ AL_STRING_INIT(device->Hrtf.Name);
AL_STRING_INIT(device->DeviceName);
device->Dry.Buffer = NULL;
@@ -3878,8 +3878,8 @@ ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(const ALCchar *deviceN
ATOMIC_INIT(&device->LastError, ALC_NO_ERROR);
device->Flags = 0;
- VECTOR_INIT(device->Hrtf_List);
- AL_STRING_INIT(device->Hrtf_Name);
+ VECTOR_INIT(device->Hrtf.List);
+ AL_STRING_INIT(device->Hrtf.Name);
device->Bs2b = NULL;
device->Uhj_Encoder = NULL;
device->Render_Mode = NormalRender;
@@ -4065,8 +4065,8 @@ ALC_API const ALCchar* ALC_APIENTRY alcGetStringiSOFT(ALCdevice *device, ALCenum
else switch(paramName)
{
case ALC_HRTF_SPECIFIER_SOFT:
- if(index >= 0 && (size_t)index < VECTOR_SIZE(device->Hrtf_List))
- str = al_string_get_cstr(VECTOR_ELEM(device->Hrtf_List, index).name);
+ if(index >= 0 && (size_t)index < VECTOR_SIZE(device->Hrtf.List))
+ str = al_string_get_cstr(VECTOR_ELEM(device->Hrtf.List, index).name);
else
alcSetError(device, ALC_INVALID_VALUE);
break;