aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-15 05:38:27 -0800
committerChris Robinson <[email protected]>2018-11-15 05:38:27 -0800
commitab9f8162b84870161948ddd27d29483206dd4e57 (patch)
tree2267d6fc4f2b3400937d9555452813cdbf29bc8a /Alc
parent9d9d626d99e2514c03a783140fa11076a4580607 (diff)
Pass a normal const char* to EnumerateHrtf
Diffstat (limited to 'Alc')
-rw-r--r--Alc/alc.cpp4
-rw-r--r--Alc/hrtf.cpp8
-rw-r--r--Alc/hrtf.h3
-rw-r--r--Alc/panning.cpp2
4 files changed, 8 insertions, 9 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp
index c90b97f6..dab2a70d 100644
--- a/Alc/alc.cpp
+++ b/Alc/alc.cpp
@@ -1996,7 +1996,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
if(VECTOR_SIZE(device->HrtfList) == 0)
{
VECTOR_DEINIT(device->HrtfList);
- device->HrtfList = EnumerateHrtf(device->DeviceName);
+ device->HrtfList = EnumerateHrtf(alstr_get_cstr(device->DeviceName));
}
if(VECTOR_SIZE(device->HrtfList) > 0)
{
@@ -3448,7 +3448,7 @@ static ALCsizei GetIntegerv(ALCdevice *device, ALCenum param, ALCsizei size, ALC
case ALC_NUM_HRTF_SPECIFIERS_SOFT:
almtx_lock(&device->BackendLock);
FreeHrtfList(&device->HrtfList);
- device->HrtfList = EnumerateHrtf(device->DeviceName);
+ device->HrtfList = EnumerateHrtf(alstr_get_cstr(device->DeviceName));
values[0] = (ALCint)VECTOR_SIZE(device->HrtfList);
almtx_unlock(&device->BackendLock);
return 1;
diff --git a/Alc/hrtf.cpp b/Alc/hrtf.cpp
index 153b57b6..4bc1305d 100644
--- a/Alc/hrtf.cpp
+++ b/Alc/hrtf.cpp
@@ -1116,13 +1116,13 @@ ResData GetResource(int name)
} // namespace
-vector_EnumeratedHrtf EnumerateHrtf(const_al_string devname)
+vector_EnumeratedHrtf EnumerateHrtf(const char *devname)
{
vector_EnumeratedHrtf list{VECTOR_INIT_STATIC()};
bool usedefaults{true};
const char *pathlist{""};
- if(ConfigValueStr(alstr_get_cstr(devname), nullptr, "hrtf-paths", &pathlist))
+ if(ConfigValueStr(devname, nullptr, "hrtf-paths", &pathlist))
{
while(pathlist && *pathlist)
{
@@ -1154,7 +1154,7 @@ vector_EnumeratedHrtf EnumerateHrtf(const_al_string devname)
pathlist = next;
}
}
- else if(ConfigValueExists(alstr_get_cstr(devname), nullptr, "hrtf_tables"))
+ else if(ConfigValueExists(devname, nullptr, "hrtf_tables"))
ERR("The hrtf_tables option is deprecated, please use hrtf-paths instead.\n");
if(usedefaults)
@@ -1172,7 +1172,7 @@ vector_EnumeratedHrtf EnumerateHrtf(const_al_string devname)
}
const char *defaulthrtf{""};
- if(VECTOR_SIZE(list) > 1 && ConfigValueStr(alstr_get_cstr(devname), nullptr, "default-hrtf", &defaulthrtf))
+ if(VECTOR_SIZE(list) > 1 && ConfigValueStr(devname, nullptr, "default-hrtf", &defaulthrtf))
{
const EnumeratedHrtf *iter{};
/* Find the preferred HRTF and move it to the front of the list. */
diff --git a/Alc/hrtf.h b/Alc/hrtf.h
index 1cdfe568..71956691 100644
--- a/Alc/hrtf.h
+++ b/Alc/hrtf.h
@@ -5,7 +5,6 @@
#include "AL/alc.h"
#include "alMain.h"
-#include "alstring.h"
#include "atomic.h"
@@ -69,7 +68,7 @@ struct AngularPoint {
void FreeHrtfs(void);
-vector_EnumeratedHrtf EnumerateHrtf(const_al_string devname);
+vector_EnumeratedHrtf EnumerateHrtf(const char *devname);
void FreeHrtfList(vector_EnumeratedHrtf *list);
struct Hrtf *GetLoadedHrtf(struct HrtfEntry *entry);
void Hrtf_IncRef(struct Hrtf *hrtf);
diff --git a/Alc/panning.cpp b/Alc/panning.cpp
index 1d1eb7ef..6507cec5 100644
--- a/Alc/panning.cpp
+++ b/Alc/panning.cpp
@@ -1116,7 +1116,7 @@ void aluInitRenderer(ALCdevice *device, ALint hrtf_id, enum HrtfRequestMode hrtf
if(VECTOR_SIZE(device->HrtfList) == 0)
{
VECTOR_DEINIT(device->HrtfList);
- device->HrtfList = EnumerateHrtf(device->DeviceName);
+ device->HrtfList = EnumerateHrtf(alstr_get_cstr(device->DeviceName));
}
if(hrtf_id >= 0 && (size_t)hrtf_id < VECTOR_SIZE(device->HrtfList))