https://www.jianshu.com/p/3e0a399380df
http://blog.csdn.net/kingshuo7/article/details/42588191 這里面總結的不錯
https://segmentfault.com/a/1190000002401961 修改系統音量,ios9好像沒用
http://blog.csdn.net/sunljdeng/article/details/49152597
http://blog.csdn.net/kingshuo7 iphone的microphone speaker硬件調用
https://developer.apple.com/library/content/qa/qa1799/_index.html 參考蘋果文檔
http://blog.csdn.net/u010795305/article/details/50979099
http://blog.csdn.net/lixing333/article/details/43154541
https://support.apple.com/en-us/HT203792 iphone麥克風位置

//邊錄邊播 會導致使用了聽筒播放 按照官方文檔的說法通過重寫audio route屬性來重定向音頻。
1.[[AVAudioSession sharedInstance]setCategory:AVAudioSessionCategoryPlayAndRecord withOptions:AVAudioSessionCategoryOptionDefaultToSpeaker error:nil];
2.[[AVAudioSession sharedInstance] overrideOutputAudioPort:AVAudioSessionPortOverrideSpeaker error:&error];//1-2兩句效果相等
[[AVAudioSession sharedInstance]setActive:YES error:nil];//馬上設置
[[AVAudioSession sharedInstance]setActive:NO error:nil];//交出音頻會話
每次的麥克風轉換都是硬件調用,會有一定幾毫秒延時,所以錄影錄或音后設定延時等待釋放后才轉換,不然換了也沒用