开发者

Checking Microphone Volume in iPhone

How to check whether microphone is mu开发者_运维问答ted before recording audio in iPhone?


Actually, you don't have to. You have to "warn" AVAudioSession that you are going to record a bit of Audio. Doing so, even if you are muted (on the IPhone, I Have not tested this with any external device) you will be able to record your audio... here is the piece of code that does that:

[[AVAudioSession sharedInstance]         
     setCategory: AVAudioSessionCategoryRecord
     error: &error];

it even records with a higher volume. Best of luck...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜