Unblock on audio when closing thread

This commit is contained in:
Jeffrey Pfau 2014-01-30 04:03:54 -08:00
parent f0481d9413
commit 95cf2909c1
1 changed files with 4 additions and 0 deletions

View File

@ -204,6 +204,10 @@ void GBAThreadEnd(struct GBAThread* threadContext) {
}
threadContext->state = THREAD_EXITING;
MutexUnlock(&threadContext->stateMutex);
MutexLock(&threadContext->sync.audioBufferMutex);
threadContext->sync.audioWait = 0;
ConditionWake(&threadContext->sync.audioRequiredCond);
MutexUnlock(&threadContext->sync.audioBufferMutex);
}
void GBAThreadJoin(struct GBAThread* threadContext) {