make sure that sound working thread is actually killed on stopping the audio interface

This commit is contained in:
Volker Fischer 2011-12-27 16:50:38 +00:00
parent 8bbc9adaa3
commit 73f408e401

View file

@ -388,6 +388,13 @@ void CSound::Stop()
// call base class // call base class
CSoundBase::Stop(); CSoundBase::Stop();
// make sure the working thread is actually done
// (by checking the locked state)
if ( ASIOMutex.tryLock ( 5000 ) )
{
ASIOMutex.unlock();
}
} }
CSound::CSound ( void (*fpNewCallback) ( CVector<int16_t>& psData, void* arg ), void* arg ) : CSound::CSound ( void (*fpNewCallback) ( CVector<int16_t>& psData, void* arg ), void* arg ) :