diff options
author | Chris Robinson <[email protected]> | 2016-05-12 23:41:23 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-05-12 23:41:23 -0700 |
commit | 770bdcc108948d57d209878bf300c3e46346f931 (patch) | |
tree | 16389b4dc5f8999c2184fa2521b7dd5e0f482a13 /Alc/panning.c | |
parent | 9e6d8342de62df83377b19577268af7106cdc088 (diff) |
Recognize AUX0...AUX15 for decoder speaker labels
Diffstat (limited to 'Alc/panning.c')
-rw-r--r-- | Alc/panning.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Alc/panning.c b/Alc/panning.c index 9ff97477..2116e739 100644 --- a/Alc/panning.c +++ b/Alc/panning.c @@ -437,9 +437,17 @@ static bool MakeSpeakerMap(ALCdevice *device, const AmbDecConf *conf, ALuint spe c = GetChannelIdxByName(device->RealOut, BackCenter); else { - ERR("AmbDec speaker label \"%s\" not recognized\n", - al_string_get_cstr(conf->Speakers[i].Name)); - return false; + const char *name = al_string_get_cstr(conf->Speakers[i].Name); + unsigned int n; + char ch; + + if(sscanf(name, "AUX%u%c", &n, &ch) == 1 && n < 16) + c = GetChannelIdxByName(device->RealOut, Aux0+n); + else + { + ERR("AmbDec speaker label \"%s\" not recognized\n", name); + return false; + } } if(c == -1) { |