diff --git a/iNDS.xcodeproj/project.pbxproj b/iNDS.xcodeproj/project.pbxproj index 1791d61..3600556 100644 --- a/iNDS.xcodeproj/project.pbxproj +++ b/iNDS.xcodeproj/project.pbxproj @@ -2205,7 +2205,7 @@ CODE_SIGN_ENTITLEMENTS = ""; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1.5.1.1; + CURRENT_PROJECT_VERSION = 1.5.1.2; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(SRCROOT)", @@ -2259,7 +2259,7 @@ CODE_SIGN_ENTITLEMENTS = ""; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1.5.1.1; + CURRENT_PROJECT_VERSION = 1.5.1.2; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(SRCROOT)", diff --git a/iNDS/Base.lproj/MainStoryboard.storyboard b/iNDS/Base.lproj/MainStoryboard.storyboard index ad9dcb3..41862c2 100755 --- a/iNDS/Base.lproj/MainStoryboard.storyboard +++ b/iNDS/Base.lproj/MainStoryboard.storyboard @@ -1,8 +1,8 @@ - + - + diff --git a/iNDS/core/Sound/iNDSMicrophone.m b/iNDS/core/Sound/iNDSMicrophone.m index 65f17eb..7461291 100755 --- a/iNDS/core/Sound/iNDSMicrophone.m +++ b/iNDS/core/Sound/iNDSMicrophone.m @@ -35,7 +35,7 @@ - (id)init audioDescription.mFramesPerPacket = 1; audioDescription.mBytesPerFrame = sizeof(UInt8); audioDescription.mBitsPerChannel = 8 * sizeof(UInt8); - audioDescription.mSampleRate = 48000.0; + audioDescription.mSampleRate = 16000.0; microphone = [EZMicrophone microphoneWithDelegate:self withAudioStreamBasicDescription:audioDescription]; diff --git a/iNDS/core/mic.mm b/iNDS/core/mic.mm index 4bc485d..d8531ea 100755 --- a/iNDS/core/mic.mm +++ b/iNDS/core/mic.mm @@ -18,7 +18,7 @@ bool micEnabled; volatile float micSampleRate = 0.0; -#define SampleRateModifer 3 +#define SampleRateModifer 1 void Mic_DeInit(){ printf("Mic_DeInit\n"); diff --git a/iNDS/iNDSEmulatorViewController.mm b/iNDS/iNDSEmulatorViewController.mm index 5d938ff..620b552 100755 --- a/iNDS/iNDSEmulatorViewController.mm +++ b/iNDS/iNDSEmulatorViewController.mm @@ -608,7 +608,7 @@ - (void)startEmulatorLoop [self.view endEditing:YES]; [self updateDisplay]; //This has to be called once before we touch or move any glk views dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{ - //dispatch_async(dispatch_get_main_queue(), ^{ + NSInteger filter = [[NSUserDefaults standardUserDefaults] integerForKey:@"videoFilter"]; displaySemaphore = dispatch_semaphore_create(1); CGFloat framesToRender = 0; lastAutosave = CACurrentMediaTime(); @@ -634,16 +634,22 @@ - (void)startEmulatorLoop [self saveStateWithName:[NSString stringWithFormat:@"Auto Save"]]; } lastAutosave = CACurrentMediaTime(); + filter = [[NSUserDefaults standardUserDefaults] integerForKey:@"videoFilter"]; } - - // Core will always be one frame ahead - dispatch_semaphore_wait(displaySemaphore, DISPATCH_TIME_FOREVER); - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{ + if (filter == 0) { EMU_copyMasterBuffer(); - //This will automatically throttle fps to 60 [self updateDisplay]; - dispatch_semaphore_signal(displaySemaphore); - }); + } else { + // Run the filter on a seperate thread to increase performance + // Core will always be one frame ahead + dispatch_semaphore_wait(displaySemaphore, DISPATCH_TIME_FOREVER); + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{ + EMU_copyMasterBuffer(); + //This will automatically throttle fps to 60 + [self updateDisplay]; + dispatch_semaphore_signal(displaySemaphore); + }); + } } [[iNDSMFIControllerSupport instance] stopMonitoringGamePad]; [emuLoopLock unlock]; @@ -725,6 +731,7 @@ - (void) setSpeed:(CGFloat)speed - (void)setLidClosed:(BOOL)closed { + return; //Disabled until freezing is fixed if (closed) { EMU_buttonDown((BUTTON_ID)13); } else { diff --git a/iNDS/support/iNDS-Info.plist b/iNDS/support/iNDS-Info.plist index 35c2a24..7d8fe95 100644 --- a/iNDS/support/iNDS-Info.plist +++ b/iNDS/support/iNDS-Info.plist @@ -92,7 +92,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.5.1.1 + 1.5.1.2 CFBundleSignature ???? CFBundleURLTypes