aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/alc.cpp2
-rw-r--r--Alc/alu.cpp2
-rw-r--r--Alc/backends/alsa.cpp6
-rw-r--r--Alc/backends/dsound.cpp6
-rw-r--r--Alc/backends/null.cpp6
-rw-r--r--Alc/backends/opensl.cpp6
-rw-r--r--Alc/backends/oss.cpp12
-rw-r--r--Alc/backends/wasapi.cpp12
-rw-r--r--Alc/backends/wave.cpp6
-rw-r--r--Alc/backends/winmm.cpp12
-rw-r--r--OpenAL32/Include/alMain.h2
11 files changed, 36 insertions, 36 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp
index b74f4918..0b89bd71 100644
--- a/Alc/alc.cpp
+++ b/Alc/alc.cpp
@@ -4258,7 +4258,7 @@ ALC_API ALCboolean ALC_APIENTRY alcResetDeviceSOFT(ALCdevice *device, const ALCi
if((dev->Flags&DEVICE_RUNNING))
dev->Backend->stop();
dev->Flags &= ~DEVICE_RUNNING;
- device->Connected.store(AL_TRUE);
+ device->Connected.store(true);
ALCenum err{UpdateDeviceParams(dev.get(), attribs)};
if(LIKELY(err == ALC_NO_ERROR)) return ALC_TRUE;
diff --git a/Alc/alu.cpp b/Alc/alu.cpp
index 672b571b..1711d3bf 100644
--- a/Alc/alu.cpp
+++ b/Alc/alu.cpp
@@ -1817,7 +1817,7 @@ void aluMixData(ALCdevice *device, ALvoid *OutBuffer, ALsizei NumSamples)
void aluHandleDisconnect(ALCdevice *device, const char *msg, ...)
{
- if(!device->Connected.exchange(AL_FALSE, std::memory_order_acq_rel))
+ if(!device->Connected.exchange(false, std::memory_order_acq_rel))
return;
AsyncEvent evt{EventType_Disconnected};
diff --git a/Alc/backends/alsa.cpp b/Alc/backends/alsa.cpp
index a3c30732..aee9c1d3 100644
--- a/Alc/backends/alsa.cpp
+++ b/Alc/backends/alsa.cpp
@@ -441,7 +441,7 @@ struct AlsaPlayback final : public BackendBase {
al::vector<char> mBuffer;
- std::atomic<ALenum> mKillNow{AL_TRUE};
+ std::atomic<bool> mKillNow{true};
std::thread mThread;
static constexpr inline const char *CurrentPrefix() noexcept { return "AlsaPlayback::"; }
@@ -856,7 +856,7 @@ ALCboolean AlsaPlayback::start()
}
try {
- mKillNow.store(AL_FALSE, std::memory_order_release);
+ mKillNow.store(false, std::memory_order_release);
mThread = std::thread{std::mem_fn(thread_func), this};
return ALC_TRUE;
}
@@ -871,7 +871,7 @@ ALCboolean AlsaPlayback::start()
void AlsaPlayback::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();
diff --git a/Alc/backends/dsound.cpp b/Alc/backends/dsound.cpp
index 4138c180..6de108cd 100644
--- a/Alc/backends/dsound.cpp
+++ b/Alc/backends/dsound.cpp
@@ -202,7 +202,7 @@ struct DSoundPlayback final : public BackendBase {
IDirectSoundNotify *mNotifies{nullptr};
HANDLE mNotifyEvent{nullptr};
- std::atomic<ALenum> mKillNow{AL_TRUE};
+ std::atomic<bool> mKillNow{true};
std::thread mThread;
static constexpr inline const char *CurrentPrefix() noexcept { return "DSoundPlayback::"; }
@@ -596,7 +596,7 @@ retry_open:
ALCboolean DSoundPlayback::start()
{
try {
- mKillNow.store(AL_FALSE, std::memory_order_release);
+ mKillNow.store(false, std::memory_order_release);
mThread = std::thread{std::mem_fn(&DSoundPlayback::mixerProc), this};
return ALC_TRUE;
}
@@ -610,7 +610,7 @@ ALCboolean DSoundPlayback::start()
void DSoundPlayback::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();
diff --git a/Alc/backends/null.cpp b/Alc/backends/null.cpp
index 7f02ad62..cba204f6 100644
--- a/Alc/backends/null.cpp
+++ b/Alc/backends/null.cpp
@@ -55,7 +55,7 @@ struct NullBackend final : public BackendBase {
ALCboolean start() override;
void stop() override;
- std::atomic<ALenum> mKillNow{AL_TRUE};
+ std::atomic<bool> mKillNow{true};
std::thread mThread;
static constexpr inline const char *CurrentPrefix() noexcept { return "NullBackend::"; }
@@ -129,7 +129,7 @@ ALCboolean NullBackend::reset()
ALCboolean NullBackend::start()
{
try {
- mKillNow.store(AL_FALSE, std::memory_order_release);
+ mKillNow.store(false, std::memory_order_release);
mThread = std::thread{std::mem_fn(&NullBackend::mixerProc), this};
return ALC_TRUE;
}
@@ -143,7 +143,7 @@ ALCboolean NullBackend::start()
void NullBackend::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();
}
diff --git a/Alc/backends/opensl.cpp b/Alc/backends/opensl.cpp
index 766b7675..69f9cda4 100644
--- a/Alc/backends/opensl.cpp
+++ b/Alc/backends/opensl.cpp
@@ -169,7 +169,7 @@ struct OpenSLPlayback final : public BackendBase {
ALsizei mFrameSize{0};
- std::atomic<ALenum> mKillNow{AL_TRUE};
+ std::atomic<bool> mKillNow{true};
std::thread mThread;
static constexpr inline const char *CurrentPrefix() noexcept { return "OpenSLPlayback::"; }
@@ -550,7 +550,7 @@ ALCboolean OpenSLPlayback::start()
if(SL_RESULT_SUCCESS != result) return ALC_FALSE;
try {
- mKillNow.store(AL_FALSE);
+ mKillNow.store(false, std::memory_order_release);
mThread = std::thread(std::mem_fn(&OpenSLPlayback::mixerProc), this);
return ALC_TRUE;
}
@@ -564,7 +564,7 @@ ALCboolean OpenSLPlayback::start()
void OpenSLPlayback::stop()
{
- if(mKillNow.exchange(AL_TRUE) || !mThread.joinable())
+ if(mKillNow.exchange(true, std::memory_order_acq_rel) || !mThread.joinable())
return;
mSem.post();
diff --git a/Alc/backends/oss.cpp b/Alc/backends/oss.cpp
index b5640ae3..05394f34 100644
--- a/Alc/backends/oss.cpp
+++ b/Alc/backends/oss.cpp
@@ -257,7 +257,7 @@ struct OSSPlayback final : public BackendBase {
al::vector<ALubyte> mMixData;
- std::atomic<ALenum> mKillNow{AL_TRUE};
+ std::atomic<bool> mKillNow{true};
std::thread mThread;
static constexpr inline const char *CurrentPrefix() noexcept { return "OSSPlayback::"; }
@@ -448,7 +448,7 @@ ALCboolean OSSPlayback::reset()
ALCboolean OSSPlayback::start()
{
try {
- mKillNow.store(AL_FALSE);
+ mKillNow.store(false, std::memory_order_release);
mThread = std::thread{std::mem_fn(&OSSPlayback::mixerProc), this};
return ALC_TRUE;
}
@@ -462,7 +462,7 @@ ALCboolean OSSPlayback::start()
void OSSPlayback::stop()
{
- if(mKillNow.exchange(AL_TRUE) || !mThread.joinable())
+ if(mKillNow.exchange(true, std::memory_order_acq_rel) || !mThread.joinable())
return;
mThread.join();
@@ -487,7 +487,7 @@ struct OSScapture final : public BackendBase {
RingBufferPtr mRing{nullptr};
- std::atomic<ALenum> mKillNow{AL_TRUE};
+ std::atomic<bool> mKillNow{true};
std::thread mThread;
static constexpr inline const char *CurrentPrefix() noexcept { return "OSScapture::"; }
@@ -661,7 +661,7 @@ ALCenum OSScapture::open(const ALCchar *name)
ALCboolean OSScapture::start()
{
try {
- mKillNow.store(AL_FALSE);
+ mKillNow.store(false, std::memory_order_release);
mThread = std::thread{std::mem_fn(&OSScapture::recordProc), this};
return ALC_TRUE;
}
@@ -675,7 +675,7 @@ ALCboolean OSScapture::start()
void OSScapture::stop()
{
- if(mKillNow.exchange(AL_TRUE) || !mThread.joinable())
+ if(mKillNow.exchange(true, std::memory_order_acq_rel) || !mThread.joinable())
return;
mThread.join();
diff --git a/Alc/backends/wasapi.cpp b/Alc/backends/wasapi.cpp
index d221565c..6fe97cb0 100644
--- a/Alc/backends/wasapi.cpp
+++ b/Alc/backends/wasapi.cpp
@@ -525,7 +525,7 @@ struct WasapiPlayback final : public BackendBase, WasapiProxy {
std::atomic<UINT32> mPadding{0u};
- std::atomic<ALenum> mKillNow{AL_TRUE};
+ std::atomic<bool> mKillNow{true};
std::thread mThread;
static constexpr inline const char *CurrentPrefix() noexcept { return "WasapiPlayback::"; }
@@ -1070,7 +1070,7 @@ HRESULT WasapiPlayback::startProxy()
{
mRender = static_cast<IAudioRenderClient*>(ptr);
try {
- mKillNow.store(AL_FALSE, std::memory_order_release);
+ mKillNow.store(false, std::memory_order_release);
mThread = std::thread{std::mem_fn(&WasapiPlayback::mixerProc), this};
}
catch(...) {
@@ -1101,7 +1101,7 @@ void WasapiPlayback::stopProxy()
if(!mRender || !mThread.joinable())
return;
- mKillNow.store(AL_TRUE);
+ mKillNow.store(true, std::memory_order_release);
mThread.join();
mRender->Release();
@@ -1156,7 +1156,7 @@ struct WasapiCapture final : public BackendBase, WasapiProxy {
SampleConverterPtr mSampleConv;
RingBufferPtr mRing;
- std::atomic<int> mKillNow{AL_TRUE};
+ std::atomic<bool> mKillNow{true};
std::thread mThread;
static constexpr inline const char *CurrentPrefix() noexcept { return "WasapiCapture::"; }
@@ -1671,7 +1671,7 @@ HRESULT WasapiCapture::startProxy()
{
mCapture = static_cast<IAudioCaptureClient*>(ptr);
try {
- mKillNow.store(AL_FALSE, std::memory_order_release);
+ mKillNow.store(false, std::memory_order_release);
mThread = std::thread{std::mem_fn(&WasapiCapture::recordProc), this};
}
catch(...) {
@@ -1705,7 +1705,7 @@ void WasapiCapture::stopProxy()
if(!mCapture || !mThread.joinable())
return;
- mKillNow.store(AL_TRUE);
+ mKillNow.store(true, std::memory_order_release);
mThread.join();
mCapture->Release();
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();
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();
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index 5e53a047..e3f24829 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -666,7 +666,7 @@ using POSTPROCESS = void(*)(ALCdevice *device, ALsizei SamplesToDo);
struct ALCdevice_struct {
RefCount ref{1u};
- std::atomic<ALenum> Connected{AL_TRUE};
+ std::atomic<bool> Connected{true};
const DeviceType Type{};
ALuint Frequency{};