diff options
author | Chris Robinson <[email protected]> | 2018-12-29 17:29:52 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-12-29 17:29:52 -0800 |
commit | 3df1d185f8bcf8d470249594a15d0e781a705ca2 (patch) | |
tree | 247c15e9cc477d3a087cbd6734612b0d52277548 | |
parent | 24e763f2a12fda79ff4ff87b46d8cfad15dc9b9e (diff) |
Don't make the backend's lock/unlock methods noexcept
-rw-r--r-- | Alc/backends/base.cpp | 6 | ||||
-rw-r--r-- | Alc/backends/base.h | 4 | ||||
-rw-r--r-- | Alc/backends/pulseaudio.cpp | 16 | ||||
-rw-r--r-- | Alc/backends/sdl2.cpp | 8 |
4 files changed, 14 insertions, 20 deletions
diff --git a/Alc/backends/base.cpp b/Alc/backends/base.cpp index 5c25b366..e3753426 100644 --- a/Alc/backends/base.cpp +++ b/Alc/backends/base.cpp @@ -57,9 +57,3 @@ ClockLatency BackendBase::getClockLatency() return ret; } - -void BackendBase::lock() noexcept -{ mMutex.lock(); } - -void BackendBase::unlock() noexcept -{ mMutex.unlock(); } diff --git a/Alc/backends/base.h b/Alc/backends/base.h index 81424bef..fc50af2b 100644 --- a/Alc/backends/base.h +++ b/Alc/backends/base.h @@ -41,8 +41,8 @@ struct BackendBase { virtual ClockLatency getClockLatency(); - virtual void lock() noexcept; - virtual void unlock() noexcept; + virtual void lock() { mMutex.lock(); }; + virtual void unlock() { mMutex.unlock(); }; ALCdevice *mDevice; diff --git a/Alc/backends/pulseaudio.cpp b/Alc/backends/pulseaudio.cpp index e714ac3f..34c5fbfe 100644 --- a/Alc/backends/pulseaudio.cpp +++ b/Alc/backends/pulseaudio.cpp @@ -759,8 +759,8 @@ struct PulsePlayback final : public BackendBase { ALCboolean start() override; void stop() override; ClockLatency getClockLatency() override; - void lock() noexcept override; - void unlock() noexcept override; + void lock() override; + void unlock() override; std::string mDeviceName; @@ -1225,10 +1225,10 @@ ClockLatency PulsePlayback::getClockLatency() } -void PulsePlayback::lock() noexcept +void PulsePlayback::lock() { pa_threaded_mainloop_lock(mLoop); } -void PulsePlayback::unlock() noexcept +void PulsePlayback::unlock() { pa_threaded_mainloop_unlock(mLoop); } @@ -1254,8 +1254,8 @@ struct PulseCapture final : public BackendBase { ALCenum captureSamples(ALCvoid *buffer, ALCuint samples) override; ALCuint availableSamples() override; ClockLatency getClockLatency() override; - void lock() noexcept override; - void unlock() noexcept override; + void lock() override; + void unlock() override; std::string mDeviceName; @@ -1577,10 +1577,10 @@ ClockLatency PulseCapture::getClockLatency() } -void PulseCapture::lock() noexcept +void PulseCapture::lock() { pa_threaded_mainloop_lock(mLoop); } -void PulseCapture::unlock() noexcept +void PulseCapture::unlock() { pa_threaded_mainloop_unlock(mLoop); } } // namespace diff --git a/Alc/backends/sdl2.cpp b/Alc/backends/sdl2.cpp index 7665146a..84b34014 100644 --- a/Alc/backends/sdl2.cpp +++ b/Alc/backends/sdl2.cpp @@ -54,8 +54,8 @@ struct Sdl2Backend final : public BackendBase { ALCboolean reset() override; ALCboolean start() override; void stop() override; - void lock() noexcept override; - void unlock() noexcept override; + void lock() override; + void unlock() override; SDL_AudioDeviceID mDeviceID{0u}; ALsizei mFrameSize{0}; @@ -178,10 +178,10 @@ ALCboolean Sdl2Backend::start() void Sdl2Backend::stop() { SDL_PauseAudioDevice(mDeviceID, 1); } -void Sdl2Backend::lock() noexcept +void Sdl2Backend::lock() { SDL_LockAudioDevice(mDeviceID); } -void Sdl2Backend::unlock() noexcept +void Sdl2Backend::unlock() { SDL_UnlockAudioDevice(mDeviceID); } } // namespace |