diff options
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r-- | Alc/ALc.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -3427,6 +3427,7 @@ 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->NumUpdates = 4; device->UpdateSize = 1024; @@ -3544,6 +3545,18 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName) } almtx_init(&device->BackendLock, almtx_plain); + if(ConfigValueStr(al_string_get_cstr(device->DeviceName), NULL, "ambi-format", &fmt)) + { + if(strcasecmp(fmt, "fuma") == 0) + device->AmbiFmt = AmbiFormat_FuMa; + else if(strcasecmp(fmt, "acn+sn3d") == 0) + device->AmbiFmt = AmbiFormat_ACN_SN3D; + else if(strcasecmp(fmt, "acn+n3d") == 0) + device->AmbiFmt = AmbiFormat_ACN_N3D; + else + ERR("Unsupported ambi-format: %s\n", fmt); + } + if(DefaultEffect.type != AL_EFFECT_NULL) { device->DefaultSlot = (ALeffectslot*)device->_slot_mem; @@ -3706,6 +3719,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *deviceName, return NULL; } device->IsHeadphones = AL_FALSE; + device->AmbiFmt = AmbiFormat_Default; device->UpdateSize = samples; device->NumUpdates = 1; @@ -3903,6 +3917,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(const ALCchar *deviceN device->FmtChans = DevFmtChannelsDefault; device->FmtType = DevFmtTypeDefault; device->IsHeadphones = AL_FALSE; + device->AmbiFmt = AmbiFormat_Default; ConfigValueUInt(NULL, NULL, "sources", &device->SourcesMax); if(device->SourcesMax == 0) device->SourcesMax = 256; |