Permalink
Browse files

Merge pull request #38 from rc1/fix-ios-simulator

Fix iOS simulator fixes #27
  • Loading branch information...
2 parents 5954bff + d9042ac commit 9ae857741e343907c15493f854e37705519b5800 @alexbw committed Nov 30, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 Novocaine/Novocaine.m
View
@@ -664,6 +664,12 @@ OSStatus inputCallback (void *inRefCon,
// Check the current number of channels
// Let's actually grab the audio
+#if TARGET_IPHONE_SIMULATOR
+ // this is a workaround for an issue with core audio on the simulator, //
+ // likely due to 44100 vs 48000 difference in OSX //
+ if( inNumberFrames == 471 )
+ inNumberFrames = 470;
+#endif
CheckError( AudioUnitRender(sm.inputUnit, ioActionFlags, inTimeStamp, inOutputBusNumber, inNumberFrames, sm.inputBuffer), "Couldn't render the output unit");

0 comments on commit 9ae8577

Please sign in to comment.