AudioCommon/WASAPI: Remove thread unsafe nullptr checks giving a false sense of safety

This commit is contained in:
Silent 2019-08-17 11:15:46 +02:00
parent 5dbbf36563
commit 991b3ba8c2
No known key found for this signature in database
GPG Key ID: AE53149BB0C45AF1
1 changed files with 2 additions and 8 deletions

View File

@ -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);
}
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);