diff options
| author | skidau <skidau@gmail.com> | 2015-05-14 13:31:28 +1000 |
|---|---|---|
| committer | skidau <skidau@gmail.com> | 2015-05-14 13:31:28 +1000 |
| commit | e35148fe1528e31bc991ac1dfa5622ec76d7bde4 (patch) | |
| tree | b74528e1f99a1c36aadee74dae4c9f8c4bac7a4a /Source/Core/AudioCommon/OpenALStream.cpp | |
| parent | 38c7021109e525f0adbdb755d3d3532c3517cecb (diff) | |
| parent | f907e5cacee4f0a6c250f0d640eb11d006475f6b (diff) | |
Merge pull request #2387 from lioncash/atomic
AudioCommon: Remove usages of volatile variables.
Diffstat (limited to 'Source/Core/AudioCommon/OpenALStream.cpp')
| -rw-r--r-- | Source/Core/AudioCommon/OpenALStream.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Core/AudioCommon/OpenALStream.cpp b/Source/Core/AudioCommon/OpenALStream.cpp index 57c2e286d6..c8cb9d23eb 100644 --- a/Source/Core/AudioCommon/OpenALStream.cpp +++ b/Source/Core/AudioCommon/OpenALStream.cpp @@ -23,6 +23,7 @@ static soundtouch::SoundTouch soundTouch; // bool OpenALStream::Start() { + m_run_thread.store(true); bool bReturn = false; ALDeviceList pDeviceList; @@ -72,7 +73,7 @@ bool OpenALStream::Start() void OpenALStream::Stop() { - threadData = 1; + m_run_thread.store(false); // kick the thread if it's waiting soundSyncEvent.Set(); @@ -183,7 +184,7 @@ void OpenALStream::SoundLoop() soundTouch.setSetting(SETTING_SEEKWINDOW_MS, 28); soundTouch.setSetting(SETTING_OVERLAP_MS, 12); - while (!threadData) + while (m_run_thread.load()) { // num_samples_to_render in this update - depends on SystemTimers::AUDIO_DMA_PERIOD. const u32 stereo_16_bit_size = 4; |
