diff options
author | Chris Robinson <[email protected]> | 2018-11-20 12:25:15 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-20 12:25:15 -0800 |
commit | f3e01ae9d4f4028f36652ae1e81bbe5bf33389bb (patch) | |
tree | 51a91613c8278ee293306a8d5f06f343b41e3d13 /Alc/alc.cpp | |
parent | a111254c26cb1c926dda8730a20790bcc5f78ef1 (diff) |
Use a normal vector for the source send properties
Diffstat (limited to 'Alc/alc.cpp')
-rw-r--r-- | Alc/alc.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp index 65e77b0d..d15b6e00 100644 --- a/Alc/alc.cpp +++ b/Alc/alc.cpp @@ -2294,20 +2294,15 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) if(old_sends != device->NumAuxSends) { - ALvoid *sends = al_calloc(16, device->NumAuxSends*sizeof(source->Send[0])); ALsizei s; - - memcpy(sends, source->Send, - mini(device->NumAuxSends, old_sends)*sizeof(source->Send[0]) - ); for(s = device->NumAuxSends;s < old_sends;s++) { if(source->Send[s].Slot) DecrementRef(&source->Send[s].Slot->ref); source->Send[s].Slot = nullptr; } - al_free(source->Send); - source->Send = static_cast<decltype(source->Send)>(sends); + source->Send.resize(device->NumAuxSends); + source->Send.shrink_to_fit(); for(s = old_sends;s < device->NumAuxSends;s++) { source->Send[s].Slot = nullptr; |