diff options
author | Chris Robinson <[email protected]> | 2020-08-28 00:09:46 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-08-28 00:09:46 -0700 |
commit | 1f486f820e97fd5ce1da40a87aa3b743800fb5b0 (patch) | |
tree | 04e70d2410fcaad3167899b81b2661b57c0488fe /alc/alc.cpp | |
parent | ecf30de36f6487c1f8a19ae0d03ba810078706f4 (diff) |
Use a separate structure for buffer storage
Diffstat (limited to 'alc/alc.cpp')
-rw-r--r-- | alc/alc.cpp | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp index 40bef38d..3ad3569c 100644 --- a/alc/alc.cpp +++ b/alc/alc.cpp @@ -1834,8 +1834,8 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const int *attrList) if(schans == ALC_BFORMAT3D_SOFT) { device->mAmbiOrder = aorder; - device->mAmbiLayout = static_cast<AmbiLayout>(alayout); - device->mAmbiScale = static_cast<AmbiNorm>(ascale); + device->mAmbiLayout = static_cast<DevAmbiLayout>(alayout); + device->mAmbiScale = static_cast<DevAmbiScaling>(ascale); } } @@ -2101,8 +2101,9 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const int *attrList) if(ALbuffer *buffer{slot->Buffer}) { slot->Effect.Buffer = nullptr; - slot->Effect.Buffer.reset(state->createBuffer(device, buffer->mData.data(), - buffer->Frequency, buffer->mFmtType, buffer->mFmtChannels, buffer->SampleLen)); + slot->Effect.Buffer.reset(state->createBuffer(device, buffer->mBuffer.mData.data(), + buffer->mBuffer.mSampleRate, buffer->mBuffer.mType, buffer->mBuffer.mChannels, + buffer->mBuffer.mSampleLen)); } slot->updateProps(context); } @@ -2128,9 +2129,10 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const int *attrList) if(ALbuffer *buffer{slot->Buffer}) { slot->Effect.Buffer = nullptr; - slot->Effect.Buffer.reset(state->createBuffer(device, buffer->mData.data(), - buffer->Frequency, buffer->mFmtType, buffer->mFmtChannels, - buffer->SampleLen)); + slot->Effect.Buffer.reset(state->createBuffer(device, + buffer->mBuffer.mData.data(), buffer->mBuffer.mSampleRate, + buffer->mBuffer.mType, buffer->mBuffer.mChannels, + buffer->mBuffer.mSampleLen)); } slot->updateProps(context); } @@ -3634,19 +3636,19 @@ START_API_FUNC ((device->mAmbiOrder%10) == 3) ? "rd" : "th"); else { - device->mAmbiLayout = AmbiLayout::FuMa; - device->mAmbiScale = AmbiNorm::FuMa; + device->mAmbiLayout = DevAmbiLayout::FuMa; + device->mAmbiScale = DevAmbiScaling::FuMa; } } else if(al::strcasecmp(fmt, "ambix") == 0 || al::strcasecmp(fmt, "acn+sn3d") == 0) { - device->mAmbiLayout = AmbiLayout::ACN; - device->mAmbiScale = AmbiNorm::SN3D; + device->mAmbiLayout = DevAmbiLayout::ACN; + device->mAmbiScale = DevAmbiScaling::SN3D; } else if(al::strcasecmp(fmt, "acn+n3d") == 0) { - device->mAmbiLayout = AmbiLayout::ACN; - device->mAmbiScale = AmbiNorm::N3D; + device->mAmbiLayout = DevAmbiLayout::ACN; + device->mAmbiScale = DevAmbiScaling::N3D; } else ERR("Unsupported ambi-format: %s\n", fmt); |