core: fix cleanup race condition in mixer

This commit is contained in:
Andrew Kelley
2015-09-13 16:54:16 -07:00
parent f7ff96fe4f
commit f7e5bf4860

View File

@@ -221,11 +221,10 @@ void Mixer::stopProcessing()
if( m_fifoWriter != NULL )
{
m_fifoWriter->finish();
m_audioDev->stopProcessing();
m_fifoWriter->wait( 1000 );
m_fifoWriter->terminate();
m_fifoWriter->wait();
delete m_fifoWriter;
m_fifoWriter = NULL;
m_audioDev->stopProcessing();
}
else
{