AlsaSoundStream: Convert volatile variables to atomics

This commit is contained in:
Lioncash
2015-05-10 00:20:27 -04:00
parent 7b376abd3b
commit 353205132c
2 changed files with 9 additions and 7 deletions

View File

@ -4,13 +4,15 @@
#pragma once
#include <atomic>
#include <thread>
#if defined(HAVE_ALSA) && HAVE_ALSA
#include <alsa/asoundlib.h>
#endif
#include "AudioCommon/SoundStream.h"
#include "Common/CommonTypes.h"
#include "Common/Thread.h"
class AlsaSound final : public SoundStream
{
@ -39,7 +41,7 @@ private:
// 0 = continue
// 1 = shutdown
// 2 = done shutting down.
volatile int thread_data;
std::atomic<int> thread_data;
snd_pcm_t *handle;
int frames_to_deliver;