summaryrefslogtreecommitdiff
path: root/Source/Core/AudioCommon/PulseAudioStream.cpp
diff options
context:
space:
mode:
authorMarkus Wick <degasus@users.noreply.github.com>2016-08-10 16:15:52 +0200
committerGitHub <noreply@github.com>2016-08-10 16:15:52 +0200
commitcaa7ff7c2597ab42cbf2b21c4be90ae4a2345326 (patch)
tree5b404c3f0f13cb0cd716f9e311089e7989d8d8de /Source/Core/AudioCommon/PulseAudioStream.cpp
parentc6a0e543a520204c1e56033ffa2511252b0dda4a (diff)
parentdca22e08eb96a401406ef7fa62c59eea1b837f7b (diff)
Merge pull request #4093 from leoetlino/flags-and-events
Use Common::Flag and Common::Event when possible
Diffstat (limited to 'Source/Core/AudioCommon/PulseAudioStream.cpp')
-rw-r--r--Source/Core/AudioCommon/PulseAudioStream.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/AudioCommon/PulseAudioStream.cpp b/Source/Core/AudioCommon/PulseAudioStream.cpp
index 7ada6478bd..e6e6a45ce2 100644
--- a/Source/Core/AudioCommon/PulseAudioStream.cpp
+++ b/Source/Core/AudioCommon/PulseAudioStream.cpp
@@ -27,7 +27,7 @@ bool PulseAudio::Start()
NOTICE_LOG(AUDIO, "PulseAudio backend using %d channels", m_channels);
- m_run_thread = true;
+ m_run_thread.Set();
m_thread = std::thread(&PulseAudio::SoundLoop, this);
// Initialize DPL2 parameters
@@ -38,7 +38,7 @@ bool PulseAudio::Start()
void PulseAudio::Stop()
{
- m_run_thread = false;
+ m_run_thread.Clear();
m_thread.join();
}
@@ -54,7 +54,7 @@ void PulseAudio::SoundLoop()
if (PulseInit())
{
- while (m_run_thread.load() && m_pa_connected == 1 && m_pa_error >= 0)
+ while (m_run_thread.IsSet() && m_pa_connected == 1 && m_pa_error >= 0)
m_pa_error = pa_mainloop_iterate(m_pa_ml, 1, nullptr);
if (m_pa_error < 0)