summaryrefslogtreecommitdiff
path: root/Source/Core/AudioCommon/PulseAudioStream.h
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2016-08-05 16:04:39 +0200
committerLéo Lam <leo@innovatetechnologi.es>2016-08-10 16:08:15 +0200
commitdca22e08eb96a401406ef7fa62c59eea1b837f7b (patch)
tree5b404c3f0f13cb0cd716f9e311089e7989d8d8de /Source/Core/AudioCommon/PulseAudioStream.h
parentc6a0e543a520204c1e56033ffa2511252b0dda4a (diff)
Use Common::Flag and Common::Event when possible
Replaces old and simple usages of std::atomic<bool> with Common::Flag (which was introduced after the initial usage), so it's clear that the variable is a flag and because Common::Flag is well tested. This also replaces the ready logic in WiimoteReal with Common::Event since it was basically just unnecessarily reimplementing Common::Event.
Diffstat (limited to 'Source/Core/AudioCommon/PulseAudioStream.h')
-rw-r--r--Source/Core/AudioCommon/PulseAudioStream.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/Core/AudioCommon/PulseAudioStream.h b/Source/Core/AudioCommon/PulseAudioStream.h
index b2c1a58414..5821007664 100644
--- a/Source/Core/AudioCommon/PulseAudioStream.h
+++ b/Source/Core/AudioCommon/PulseAudioStream.h
@@ -8,10 +8,9 @@
#include <pulse/pulseaudio.h>
#endif
-#include <atomic>
-
#include "AudioCommon/SoundStream.h"
#include "Common/CommonTypes.h"
+#include "Common/Flag.h"
#include "Common/Thread.h"
class PulseAudio final : public SoundStream
@@ -41,7 +40,7 @@ private:
static void UnderflowCallback(pa_stream* s, void* userdata);
std::thread m_thread;
- std::atomic<bool> m_run_thread;
+ Common::Flag m_run_thread;
bool m_stereo; // stereo, else surround
int m_bytespersample;