Skip to content
Browse files

Conditional for iOS Simulator. Fixes #27

  • Loading branch information...
1 parent ca17589 commit d9042acd06ffee6c72cfe3b675d6c4632b597034 @rc1 rc1 committed Nov 29, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 Novocaine/Novocaine.m
View
5 Novocaine/Novocaine.m
@@ -664,7 +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 d9042ac

Please sign in to comment.
Something went wrong with that request. Please try again.