From 2113af299444d147a2a9ec7dc4646d67176b5b28 Mon Sep 17 00:00:00 2001 From: rogerman Date: Wed, 13 Apr 2022 17:24:23 -0700 Subject: [PATCH] Cocoa Port: Update the microphone level once every 4 frames instead of once every 8 frames. This makes the level indicator appear smoother. --- desmume/src/frontend/cocoa/cocoa_core.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desmume/src/frontend/cocoa/cocoa_core.mm b/desmume/src/frontend/cocoa/cocoa_core.mm index 1502cd961..c61b3f054 100644 --- a/desmume/src/frontend/cocoa/cocoa_core.mm +++ b/desmume/src/frontend/cocoa/cocoa_core.mm @@ -1263,9 +1263,9 @@ static void* RunCoreThread(void *arg) avCaptureObject->StreamWriteStart(); } - // Make sure that the mic level is updated at least once every 8 frames, regardless + // Make sure that the mic level is updated at least once every 4 frames, regardless // of whether the NDS actually reads the mic or not. - if ((ndsFrameInfo.frameIndex & 0x07) == 0x07) + if ((ndsFrameInfo.frameIndex & 0x03) == 0x03) { NSAutoreleasePool *tempPool = [[NSAutoreleasePool alloc] init]; inputHandler->ReportAverageMicLevel();