aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/winmm.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/winmm.cpp
parent9f5c9a2260849240bd680b8fdf533acdef7f9de1 (diff)
Use an atomic bool on things that only take true or false
Diffstat (limited to 'Alc/backends/winmm.cpp')
-rw-r--r--Alc/backends/winmm.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Alc/backends/winmm.cpp b/Alc/backends/winmm.cpp
index bc599006..34eade29 100644
--- a/Alc/backends/winmm.cpp
+++ b/Alc/backends/winmm.cpp
@@ -144,7 +144,7 @@ struct WinMMPlayback final : public BackendBase {
WAVEFORMATEX mFormat{};
- std::atomic<ALenum> mKillNow{AL_TRUE};
+ std::atomic<bool> mKillNow{true};
std::thread mThread;
static constexpr inline const char *CurrentPrefix() noexcept { return "WinMMPlayback::"; }
@@ -336,7 +336,7 @@ ALCboolean WinMMPlayback::start()
);
mWritable.store(static_cast<ALuint>(mWaveBuffer.size()), std::memory_order_release);
- mKillNow.store(AL_FALSE, std::memory_order_release);
+ mKillNow.store(false, std::memory_order_release);
mThread = std::thread{std::mem_fn(&WinMMPlayback::mixerProc), this};
return ALC_TRUE;
}
@@ -350,7 +350,7 @@ ALCboolean WinMMPlayback::start()
void WinMMPlayback::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();
@@ -390,7 +390,7 @@ struct WinMMCapture final : public BackendBase {
WAVEFORMATEX mFormat{};
- std::atomic<ALenum> mKillNow{AL_TRUE};
+ std::atomic<bool> mKillNow{true};
std::thread mThread;
static constexpr inline const char *CurrentPrefix() noexcept { return "WinMMCapture::"; }
@@ -554,7 +554,7 @@ ALCboolean WinMMCapture::start()
waveInAddBuffer(mInHdl, &mWaveBuffer[i], sizeof(WAVEHDR));
}
- mKillNow.store(AL_FALSE, std::memory_order_release);
+ mKillNow.store(false, std::memory_order_release);
mThread = std::thread{std::mem_fn(&WinMMCapture::captureProc), this};
waveInStart(mInHdl);
@@ -572,7 +572,7 @@ void WinMMCapture::stop()
{
waveInStop(mInHdl);
- mKillNow.store(AL_TRUE, std::memory_order_release);
+ mKillNow.store(true, std::memory_order_release);
if(mThread.joinable())
{
mSem.post();