all repos — mgba @ 50622f9e557386192c7ff2d67921ad1c1ba04ec0

mGBA Game Boy Advance Emulator

PSP2: Fix audio crackling after fast forward
Vicki Pfau vi@endrift.com
Tue, 25 Sep 2018 11:16:30 -0700
commit

50622f9e557386192c7ff2d67921ad1c1ba04ec0

parent

776d8a7f7126aa6fe215a22c507a00e2aba9911a

2 files changed, 10 insertions(+), 0 deletions(-)

jump to
M CHANGESCHANGES

@@ -98,6 +98,9 @@ - Qt: Clean up FPS target UI (fixes mgba.io/i/436)

- Core: Remove broken option for whether rewinding restores save games - FFmpeg: Support lossless VP9 encoding - mGUI: Add fast forward toggle +Changes from beta 1: +Bugfixes: + - PSP2: Fix audio crackling after fast forward 0.6 beta 1: (2018-09-24) - Initial beta for 0.6
M src/platform/psp2/psp2-context.csrc/platform/psp2/psp2-context.c

@@ -280,6 +280,13 @@ }

void mPSP2SetFrameLimiter(struct mGUIRunner* runner, bool limit) { UNUSED(runner); + if (!frameLimiter && limit) { + MutexLock(&audioContext.mutex); + while (audioContext.samples) { + ConditionWait(&audioContext.cond, &audioContext.mutex); + } + MutexUnlock(&audioContext.mutex); + } frameLimiter = limit; }