aboutsummaryrefslogtreecommitdiffstats
path: root/alc/panning.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-12-25 09:26:24 -0800
committerChris Robinson <[email protected]>2020-12-25 09:26:24 -0800
commitf6e29ce5bb88dda99d359e6c3fc5b84b4ae1e56b (patch)
tree8db92cb1075b0fd7eea63ee0ca6c0b72415b5f8d /alc/panning.cpp
parent78f73a42770f436218fc40b85ff804b301201df1 (diff)
Return an optional for an error
Diffstat (limited to 'alc/panning.cpp')
-rw-r--r--alc/panning.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/alc/panning.cpp b/alc/panning.cpp
index 8d423d64..5b592430 100644
--- a/alc/panning.cpp
+++ b/alc/panning.cpp
@@ -878,13 +878,16 @@ void aluInitRenderer(ALCdevice *device, int hrtf_id, HrtfRequestMode hrtf_appreq
{
if(auto decopt = ConfigValueStr(devname, "decoder", layout))
{
- if(!conf.load(decopt->c_str()))
+ if(auto err = conf.load(decopt->c_str()))
+ {
ERR("Failed to load layout file %s\n", decopt->c_str());
+ ERR(" %s\n", err->c_str());
+ }
else if(conf.NumSpeakers > MAX_OUTPUT_CHANNELS)
- ERR("Unsupported speaker count %zu (max %d)\n", conf.NumSpeakers,
+ ERR("Unsupported decoder speaker count %zu (max %d)\n", conf.NumSpeakers,
MAX_OUTPUT_CHANNELS);
else if(conf.ChanMask > Ambi3OrderMask)
- ERR("Unsupported channel mask 0x%04x (max 0x%x)\n", conf.ChanMask,
+ ERR("Unsupported decoder channel mask 0x%04x (max 0x%x)\n", conf.ChanMask,
Ambi3OrderMask);
else if(MakeSpeakerMap(device, &conf, speakermap))
pconf = &conf;