mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-01 21:58:48 +00:00
AlsaSoundStream: Convert volatile variables to atomics
This commit is contained in:
parent
7b376abd3b
commit
353205132c
2 changed files with 9 additions and 7 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue