diff options
| author | Silent <zdanio95@gmail.com> | 2019-08-17 11:15:46 +0200 |
|---|---|---|
| committer | Silent <zdanio95@gmail.com> | 2021-01-12 19:24:49 +0100 |
| commit | 991b3ba8c2543ccfc08a89929e44e6e8a33ce559 (patch) | |
| tree | 062276967f14497e20e2e91496143ff58aba9d21 /Source/Core/AudioCommon/WASAPIStream.cpp | |
| parent | 5dbbf36563ce5a75e84f58f000d45e3b4c1ab82d (diff) | |
AudioCommon/WASAPI: Remove thread unsafe nullptr checks giving a false sense of safety
Diffstat (limited to 'Source/Core/AudioCommon/WASAPIStream.cpp')
| -rw-r--r-- | Source/Core/AudioCommon/WASAPIStream.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Source/Core/AudioCommon/WASAPIStream.cpp b/Source/Core/AudioCommon/WASAPIStream.cpp index 2ee39f668c..9be46cb751 100644 --- a/Source/Core/AudioCommon/WASAPIStream.cpp +++ b/Source/Core/AudioCommon/WASAPIStream.cpp @@ -353,17 +353,11 @@ void WASAPIStream::SoundLoop() Common::SetCurrentThreadName("WASAPI Handler"); BYTE* data; - if (m_audio_renderer) - { - m_audio_renderer->GetBuffer(m_frames_in_buffer, &data); - m_audio_renderer->ReleaseBuffer(m_frames_in_buffer, AUDCLNT_BUFFERFLAGS_SILENT); - } + m_audio_renderer->GetBuffer(m_frames_in_buffer, &data); + m_audio_renderer->ReleaseBuffer(m_frames_in_buffer, AUDCLNT_BUFFERFLAGS_SILENT); while (m_running.load(std::memory_order_relaxed)) { - if (!m_audio_renderer) - continue; - WaitForSingleObject(m_need_data_event.get(), 1000); m_audio_renderer->GetBuffer(m_frames_in_buffer, &data); |
