diff options
-rw-r--r-- | alc/alc.cpp | 2 | ||||
-rw-r--r-- | alc/alconfig.cpp | 2 | ||||
-rw-r--r-- | alc/alconfig.h | 2 | ||||
-rw-r--r-- | alc/device.h | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp index ee89b60a..50cda827 100644 --- a/alc/alc.cpp +++ b/alc/alc.cpp @@ -2102,7 +2102,7 @@ ALCenum UpdateDeviceParams(ALCdevice *device, const int *attrList) sample_delay += FrontStablizer::DelayLength; } - if(device->getConfigValueBool(nullptr, "dither", 1)) + if(device->getConfigValueBool(nullptr, "dither", true)) { int depth{device->configValue<int>(nullptr, "dither-depth").value_or(0)}; if(depth <= 0) diff --git a/alc/alconfig.cpp b/alc/alconfig.cpp index 60cb4daf..7c1eec6d 100644 --- a/alc/alconfig.cpp +++ b/alc/alconfig.cpp @@ -519,7 +519,7 @@ al::optional<bool> ConfigValueBool(const char *devName, const char *blockName, c return al::nullopt; } -int GetConfigValueBool(const char *devName, const char *blockName, const char *keyName, int def) +bool GetConfigValueBool(const char *devName, const char *blockName, const char *keyName, bool def) { if(const char *val{GetConfigValue(devName, blockName, keyName)}) return (al::strcasecmp(val, "on") == 0 || al::strcasecmp(val, "yes") == 0 diff --git a/alc/alconfig.h b/alc/alconfig.h index 57733acb..df2830cc 100644 --- a/alc/alconfig.h +++ b/alc/alconfig.h @@ -7,7 +7,7 @@ void ReadALConfig(); -int GetConfigValueBool(const char *devName, const char *blockName, const char *keyName, int def); +bool GetConfigValueBool(const char *devName, const char *blockName, const char *keyName, bool def); al::optional<std::string> ConfigValueStr(const char *devName, const char *blockName, const char *keyName); al::optional<int> ConfigValueInt(const char *devName, const char *blockName, const char *keyName); diff --git a/alc/device.h b/alc/device.h index 62ed0346..04931a5a 100644 --- a/alc/device.h +++ b/alc/device.h @@ -137,7 +137,7 @@ struct ALCdevice : public al::intrusive_ref<ALCdevice>, DeviceBase { void enumerateHrtfs(); - bool getConfigValueBool(const char *block, const char *key, int def) + bool getConfigValueBool(const char *block, const char *key, bool def) { return GetConfigValueBool(DeviceName.c_str(), block, key, def); } template<typename T> |