mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Use Common::Flag and Common::Event when possible
Replaces old and simple usages of std::atomic<bool> with Common::Flag (which was introduced after the initial usage), so it's clear that the variable is a flag and because Common::Flag is well tested. This also replaces the ready logic in WiimoteReal with Common::Event since it was basically just unnecessarily reimplementing Common::Event.
This commit is contained in:
@ -25,7 +25,7 @@ static soundtouch::SoundTouch soundTouch;
|
||||
//
|
||||
bool OpenALStream::Start()
|
||||
{
|
||||
m_run_thread.store(true);
|
||||
m_run_thread.Set();
|
||||
bool bReturn = false;
|
||||
|
||||
ALDeviceList pDeviceList;
|
||||
@ -75,7 +75,7 @@ bool OpenALStream::Start()
|
||||
|
||||
void OpenALStream::Stop()
|
||||
{
|
||||
m_run_thread.store(false);
|
||||
m_run_thread.Clear();
|
||||
// kick the thread if it's waiting
|
||||
soundSyncEvent.Set();
|
||||
|
||||
@ -207,7 +207,7 @@ void OpenALStream::SoundLoop()
|
||||
soundTouch.setSetting(SETTING_SEEKWINDOW_MS, 28);
|
||||
soundTouch.setSetting(SETTING_OVERLAP_MS, 12);
|
||||
|
||||
while (m_run_thread.load())
|
||||
while (m_run_thread.IsSet())
|
||||
{
|
||||
// num_samples_to_render in this update - depends on SystemTimers::AUDIO_DMA_PERIOD.
|
||||
const u32 stereo_16_bit_size = 4;
|
||||
|
Reference in New Issue
Block a user