AlsaSoundStream: Use an enum class for signifying ALSA thread state

This commit is contained in:
Lioncash
2015-05-10 02:30:24 -04:00
parent 353205132c
commit f907e5cace
2 changed files with 18 additions and 10 deletions

View File

@ -33,15 +33,19 @@ public:
virtual void Update() override;
private:
enum class ALSAThreadStatus
{
RUNNING,
STOPPING,
STOPPED,
};
bool AlsaInit();
void AlsaShutdown();
u8 *mix_buffer;
std::thread thread;
// 0 = continue
// 1 = shutdown
// 2 = done shutting down.
std::atomic<int> thread_data;
std::atomic<ALSAThreadStatus> m_thread_status;
snd_pcm_t *handle;
int frames_to_deliver;