alexbw / novocaine

Painless high-performance audio on iOS and Mac OS X
http://alexbw.github.com/novocaine/
MIT License
2.23k stars 273 forks source link

Disable Mic Input iOS #76

Closed DMT4u closed 10 years ago

DMT4u commented 10 years ago

I would like to completely disable the mic input for iOS.

Main reason are :

  1. To remove the system UIAlertView to use the microphone upon launch,
  2. Remove the red bar "recording" that appears when the app goes into background mode.

Any hints on where to modify to make this possible would be much appreciated.

DMT4u commented 10 years ago

Ok I fixed it.. the quickest hack to get it working is to comment the following code in Novocaine.mm

/* UInt32 one = 1; CheckError( AudioUnitSetProperty(_inputUnit, kAudioOutputUnitProperty_EnableIO, kAudioUnitScope_Input, kInputBus, &one, sizeof(one)), "Couldn't enable IO on the input scope of output unit");

*/

Then it works fine..