aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/wave.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-12-30 21:58:14 -0800
committerChris Robinson <[email protected]>2018-12-30 21:58:14 -0800
commit5e03941701c112083b5dce14257fd8c51262f04f (patch)
treee60fe1ba85f1d42e0f2b574360713842769df135 /Alc/backends/wave.cpp
parent9f5c9a2260849240bd680b8fdf533acdef7f9de1 (diff)
Use an atomic bool on things that only take true or false
Diffstat (limited to 'Alc/backends/wave.cpp')
-rw-r--r--Alc/backends/wave.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/backends/wave.cpp b/Alc/backends/wave.cpp
index 36adce95..42b67a19 100644
--- a/Alc/backends/wave.cpp
+++ b/Alc/backends/wave.cpp
@@ -95,7 +95,7 @@ struct WaveBackend final : public BackendBase {
al::vector<ALbyte> mBuffer;
- std::atomic<ALenum> mKillNow{AL_TRUE};
+ std::atomic<bool> mKillNow{true};
std::thread mThread;
static constexpr inline const char *CurrentPrefix() noexcept { return "WaveBackend::"; }
@@ -328,7 +328,7 @@ ALCboolean WaveBackend::reset()
ALCboolean WaveBackend::start()
{
try {
- mKillNow.store(AL_FALSE, std::memory_order_release);
+ mKillNow.store(false, std::memory_order_release);
mThread = std::thread{std::mem_fn(&WaveBackend::mixerProc), this};
return ALC_TRUE;
}
@@ -342,7 +342,7 @@ ALCboolean WaveBackend::start()
void WaveBackend::stop()
{
- if(mKillNow.exchange(AL_TRUE, std::memory_order_acq_rel) || !mThread.joinable())
+ if(mKillNow.exchange(true, std::memory_order_acq_rel) || !mThread.joinable())
return;
mThread.join();