diff options
author | Chris Robinson <[email protected]> | 2018-12-27 12:55:43 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-12-27 12:55:43 -0800 |
commit | 1a4387d137acb57f69a2b5d073faf55d4a4c32ed (patch) | |
tree | 70b19a7ffa44c148c76996e3f715b0dff795dd4c /Alc/backends/coreaudio.cpp | |
parent | 323cf58f02bd2a8a92006a5ee20014d2eb8ff3a9 (diff) |
Return unique_ptrs instead of raw pointers
For the ring buffer, channel converter, and sample converter.
Diffstat (limited to 'Alc/backends/coreaudio.cpp')
-rw-r--r-- | Alc/backends/coreaudio.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/backends/coreaudio.cpp b/Alc/backends/coreaudio.cpp index c0b6601b..8f4a8d2a 100644 --- a/Alc/backends/coreaudio.cpp +++ b/Alc/backends/coreaudio.cpp @@ -321,7 +321,7 @@ struct ALCcoreAudioCapture final : public ALCbackend { ALuint mFrameSize{0u}; AudioStreamBasicDescription mFormat{}; // This is the OpenAL format as a CoreAudio ASBD - std::unique_ptr<SampleConverter> mConverter; + SampleConverterPtr mConverter; RingBufferPtr mRing{nullptr}; }; @@ -633,11 +633,11 @@ static ALCenum ALCcoreAudioCapture_open(ALCcoreAudioCapture *self, const ALCchar // Set up sample converter if needed if(outputFormat.mSampleRate != device->Frequency) - self->mConverter.reset(CreateSampleConverter(device->FmtType, device->FmtType, + self->mConverter = CreateSampleConverter(device->FmtType, device->FmtType, self->mFormat.mChannelsPerFrame, hardwareFormat.mSampleRate, device->Frequency, - BSinc24Resampler)); + BSinc24Resampler); - self->mRing.reset(ll_ringbuffer_create(outputFrameCount, self->mFrameSize, false)); + self->mRing = CreateRingBuffer(outputFrameCount, self->mFrameSize, false); if(!self->mRing) return ALC_INVALID_VALUE; device->DeviceName = name; |