aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alc.cpp
diff options
context:
space:
mode:
authorChris Robinson <chris.kcat@gmail.com>2019-01-01 14:33:01 -0800
committerChris Robinson <chris.kcat@gmail.com>2019-01-01 14:33:01 -0800
commit2f1566e0b4e71f9b03ae8081e81a85f52ddeab23 (patch)
treee16fee5e76b8c1b581f3003d487d711cb29ce9de /Alc/alc.cpp
parentc36798fd0759331caac80bb16cebe6c19a646090 (diff)
Add and use a make_unique function
Diffstat (limited to 'Alc/alc.cpp')
-rw-r--r--Alc/alc.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp
index 0b89bd71..59582ea6 100644
--- a/Alc/alc.cpp
+++ b/Alc/alc.cpp
@@ -3453,7 +3453,7 @@ ALC_API ALCcontext* ALC_APIENTRY alcCreateContext(ALCdevice *device, const ALCin
if(DefaultEffect.type != AL_EFFECT_NULL && dev->Type == Playback)
{
- ALContext->DefaultSlot.reset(new ALeffectslot{});
+ ALContext->DefaultSlot = al::make_unique<ALeffectslot>();
if(InitEffectSlot(ALContext->DefaultSlot.get()) == AL_NO_ERROR)
aluInitEffectPanning(ALContext->DefaultSlot.get());
else
@@ -3652,7 +3652,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName)
))
deviceName = nullptr;
- std::unique_ptr<ALCdevice> device{new ALCdevice{Playback}};
+ auto device = al::make_unique<ALCdevice>(Playback);
//Set output format
device->FmtChans = DevFmtChannelsDefault;
@@ -3896,7 +3896,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *deviceName,
if(deviceName && (!deviceName[0] || strcasecmp(deviceName, alcDefaultName) == 0 || strcasecmp(deviceName, "openal-soft") == 0))
deviceName = nullptr;
- std::unique_ptr<ALCdevice> device{new ALCdevice{Capture}};
+ auto device = al::make_unique<ALCdevice>(Capture);
device->Frequency = frequency;
device->Flags |= DEVICE_FREQUENCY_REQUEST;
@@ -4060,7 +4060,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(const ALCchar *deviceN
return nullptr;
}
- std::unique_ptr<ALCdevice> device{new ALCdevice{Loopback}};
+ auto device = al::make_unique<ALCdevice>(Loopback);
device->SourcesMax = 256;
device->AuxiliaryEffectSlotMax = 64;