mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-21 19:31:19 +02:00
More attempts to fix this bug
This commit is contained in:
@@ -318,6 +318,7 @@ static void audioCallback(GB_gameboy_t *gb, GB_sample_t *sample)
|
|||||||
if (stopping) {
|
if (stopping) {
|
||||||
memset(buffer, 0, nFrames * sizeof(*buffer));
|
memset(buffer, 0, nFrames * sizeof(*buffer));
|
||||||
[audioLock unlock];
|
[audioLock unlock];
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (audioBufferPosition >= nFrames && audioBufferPosition < nFrames + 4800) {
|
if (audioBufferPosition >= nFrames && audioBufferPosition < nFrames + 4800) {
|
||||||
@@ -380,7 +381,11 @@ static void audioCallback(GB_gameboy_t *gb, GB_sample_t *sample)
|
|||||||
[audioLock signal];
|
[audioLock signal];
|
||||||
[audioLock unlock];
|
[audioLock unlock];
|
||||||
running = false;
|
running = false;
|
||||||
while (stopping);
|
while (stopping) {
|
||||||
|
[audioLock lock];
|
||||||
|
[audioLock signal];
|
||||||
|
[audioLock unlock];
|
||||||
|
}
|
||||||
GB_debugger_set_disabled(&gb, false);
|
GB_debugger_set_disabled(&gb, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user