diff options
author | Chris Robinson <[email protected]> | 2018-11-22 06:49:37 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-22 06:49:37 -0800 |
commit | 9d73e03aaa6d51d6b787b0d576760f782fc3394f (patch) | |
tree | 5fa306fa15d385db3d72098ac870dcd204b4ce7b /Alc/panning.cpp | |
parent | b3b42201828bb737c55c20bd46af10b40d10ef85 (diff) |
Use unique_ptr for bs2b
Diffstat (limited to 'Alc/panning.cpp')
-rw-r--r-- | Alc/panning.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/panning.cpp b/Alc/panning.cpp index e9a410e1..29c708f6 100644 --- a/Alc/panning.cpp +++ b/Alc/panning.cpp @@ -1163,7 +1163,7 @@ void aluInitRenderer(ALCdevice *device, ALint hrtf_id, enum HrtfRequestMode hrtf no_hrtf: if(old_hrtf) Hrtf_DecRef(old_hrtf); - old_hrtf = NULL; + old_hrtf = nullptr; TRACE("HRTF disabled\n"); device->Render_Mode = StereoPair; @@ -1176,8 +1176,8 @@ no_hrtf: ConfigValueInt(device->DeviceName.c_str(), NULL, "cf_level", &bs2blevel); if(bs2blevel > 0 && bs2blevel <= 6) { - device->Bs2b = reinterpret_cast<struct bs2b*>(al_calloc(16, sizeof(*device->Bs2b))); - bs2b_set_params(device->Bs2b, bs2blevel, device->Frequency); + device->Bs2b.reset(new bs2b{}); + bs2b_set_params(device->Bs2b.get(), bs2blevel, device->Frequency); TRACE("BS2B enabled\n"); InitPanning(device); return; |