all repos — mgba @ 95cf2909c115f4a09b727872ed3aa2225e03eced

mGBA Game Boy Advance Emulator

Unblock on audio when closing thread
Jeffrey Pfau jeffrey@endrift.com
Thu, 30 Jan 2014 04:03:54 -0800
commit

95cf2909c115f4a09b727872ed3aa2225e03eced

parent

f0481d94135b9f671bea3847559431e67a07bf48

1 files changed, 4 insertions(+), 0 deletions(-)

jump to
M src/gba/gba-thread.csrc/gba/gba-thread.c

@@ -204,6 +204,10 @@ threadContext->debugger->state = DEBUGGER_EXITING;

} 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) {