Fix more audio deadlocks

This commit is contained in:
Lior Halphon 2021-02-01 23:11:42 +02:00
parent 301c0f41c2
commit 8ad08c1b35

View File

@ -381,7 +381,7 @@ static void infraredStateChanged(GB_gameboy_t *gb, bool on)
[audioLock wait]; [audioLock wait];
} }
if (stopping) { if (stopping || GB_debugger_is_stopped(&gb)) {
memset(buffer, 0, nFrames * sizeof(*buffer)); memset(buffer, 0, nFrames * sizeof(*buffer));
[audioLock unlock]; [audioLock unlock];
return; return;
@ -1105,6 +1105,7 @@ static unsigned *multiplication_table_for_frequency(unsigned frequency)
- (char *) getDebuggerInput - (char *) getDebuggerInput
{ {
[audioLock signal];
[self updateSideView]; [self updateSideView];
[self log:">"]; [self log:">"];
in_sync_input = true; in_sync_input = true;