From 770bdcc108948d57d209878bf300c3e46346f931 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 12 May 2016 23:41:23 -0700 Subject: [PATCH] Recognize AUX0...AUX15 for decoder speaker labels --- Alc/panning.c | 14 +++++++++++--- 1 file 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) {