aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c24
-rw-r--r--Alc/backends/wave.c3
-rw-r--r--Alc/panning.c8
3 files changed, 24 insertions, 11 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index bf683ba3..56063bb1 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -3640,7 +3640,8 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName)
device->FmtType = DevFmtTypeDefault;
device->Frequency = DEFAULT_OUTPUT_RATE;
device->IsHeadphones = AL_FALSE;
- device->AmbiFmt = AmbiFormat_Default;
+ device->AmbiLayout = AmbiLayout_Default;
+ device->AmbiScale = AmbiNorm_Default;
device->NumUpdates = 3;
device->UpdateSize = 1024;
@@ -3763,11 +3764,20 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName)
if(ConfigValueStr(al_string_get_cstr(device->DeviceName), NULL, "ambi-format", &fmt))
{
if(strcasecmp(fmt, "fuma") == 0)
- device->AmbiFmt = AmbiFormat_FuMa;
+ {
+ device->AmbiLayout = AmbiLayout_FuMa;
+ device->AmbiScale = AmbiNorm_FuMa;
+ }
else if(strcasecmp(fmt, "acn+sn3d") == 0)
- device->AmbiFmt = AmbiFormat_ACN_SN3D;
+ {
+ device->AmbiLayout = AmbiLayout_ACN;
+ device->AmbiScale = AmbiNorm_SN3D;
+ }
else if(strcasecmp(fmt, "acn+n3d") == 0)
- device->AmbiFmt = AmbiFormat_ACN_N3D;
+ {
+ device->AmbiLayout = AmbiLayout_ACN;
+ device->AmbiScale = AmbiNorm_N3D;
+ }
else
ERR("Unsupported ambi-format: %s\n", fmt);
}
@@ -3939,7 +3949,8 @@ ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *deviceName,
return NULL;
}
device->IsHeadphones = AL_FALSE;
- device->AmbiFmt = AmbiFormat_Default;
+ device->AmbiLayout = AmbiLayout_Default;
+ device->AmbiScale = AmbiNorm_Default;
device->UpdateSize = samples;
device->NumUpdates = 1;
@@ -4142,7 +4153,8 @@ ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(const ALCchar *deviceN
device->FmtChans = DevFmtChannelsDefault;
device->FmtType = DevFmtTypeDefault;
device->IsHeadphones = AL_FALSE;
- device->AmbiFmt = AmbiFormat_Default;
+ device->AmbiLayout = AmbiLayout_Default;
+ device->AmbiScale = AmbiNorm_Default;
ConfigValueUInt(NULL, NULL, "sources", &device->SourcesMax);
if(device->SourcesMax == 0) device->SourcesMax = 256;
diff --git a/Alc/backends/wave.c b/Alc/backends/wave.c
index ac0ffd80..1b13746e 100644
--- a/Alc/backends/wave.c
+++ b/Alc/backends/wave.c
@@ -283,7 +283,8 @@ static ALCboolean ALCwaveBackend_reset(ALCwaveBackend *self)
case DevFmtAmbi2:
case DevFmtAmbi3:
/* .amb output requires FuMa */
- device->AmbiFmt = AmbiFormat_FuMa;
+ device->AmbiLayout = AmbiLayout_FuMa;
+ device->AmbiScale = AmbiNorm_FuMa;
isbformat = 1;
chanmask = 0;
break;
diff --git a/Alc/panning.c b/Alc/panning.c
index 46f134a6..77f8e31b 100644
--- a/Alc/panning.c
+++ b/Alc/panning.c
@@ -546,10 +546,10 @@ static void InitPanning(ALCdevice *device)
if(device->FmtChans >= DevFmtAmbi1 && device->FmtChans <= DevFmtAmbi3)
{
- const ALsizei *acnmap = (device->AmbiFmt == AmbiFormat_FuMa) ? FuMa2ACN : ACN2ACN;
- const ALfloat *n3dscale = (device->AmbiFmt == AmbiFormat_FuMa) ? FuMa2N3DScale :
- (device->AmbiFmt == AmbiFormat_ACN_SN3D) ? SN3D2N3DScale :
- /*(device->AmbiFmt == AmbiFormat_ACN_N3D) ?*/ UnitScale;
+ const ALsizei *acnmap = (device->AmbiLayout == AmbiLayout_FuMa) ? FuMa2ACN : ACN2ACN;
+ const ALfloat *n3dscale = (device->AmbiScale == AmbiNorm_FuMa) ? FuMa2N3DScale :
+ (device->AmbiScale == AmbiNorm_SN3D) ? SN3D2N3DScale :
+ /*(device->AmbiScale == AmbiNorm_N3D) ?*/ UnitScale;
count = (device->FmtChans == DevFmtAmbi3) ? 16 :
(device->FmtChans == DevFmtAmbi2) ? 9 :