aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-09-19 11:29:18 -0700
committerChris Robinson <[email protected]>2011-09-19 11:29:18 -0700
commitedb386eb1edaed1661089064bab57c8d39c52a15 (patch)
treeb0551187a3003a117e591ff87d459ee95eb3be4c /Alc/ALc.c
parentcc3dd648ace1f1276e909dcb07adf782a39f1cf3 (diff)
Add a ConfigValueStr function, to return the string through a parameter
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 0076921e..8762272e 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -606,8 +606,7 @@ static void alc_initconfig(void)
EmulateEAXReverb = GetConfigValueBool("reverb", "emulate-eax", AL_FALSE);
- devs = GetConfigValue(NULL, "drivers", "");
- if(devs[0])
+ if(ConfigValueStr(NULL, "drivers", &devs))
{
int n;
size_t len;
@@ -690,8 +689,7 @@ static void alc_initconfig(void)
}
BackendLoopback.Init(&BackendLoopback.Funcs);
- str = GetConfigValue(NULL, "excludefx", "");
- if(str[0])
+ if(ConfigValueStr(NULL, "excludefx", &str))
{
size_t len;
const char *next = str;
@@ -2453,9 +2451,9 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName)
device->Flags |= DEVICE_FREQUENCY_REQUEST;
device->Frequency = maxu(device->Frequency, 8000);
- if(ConfigValueExists(NULL, "format"))
+ fmt = "AL_FORMAT_STEREO16";
+ if(ConfigValueStr(NULL, "format", &fmt))
device->Flags |= DEVICE_CHANNELS_REQUEST;
- fmt = GetConfigValue(NULL, "format", "AL_FORMAT_STEREO16");
GetFormatFromString(fmt, &device->FmtChans, &device->FmtType);
ConfigValueUInt(NULL, "periods", &device->NumUpdates);