views:

149

answers:

1

You can easily play sounds and record sounds using the high level AVAudioPlayer. And you can play sounds using the same framework, while the iPhone screen is locked. Can you record sounds at that time?

A: 

Yes, of course, just set correct category....................................................................................................................................

""AVAudioSessionCategoryRecord For recording audio; this category silences playback audio. Recording continues with the screen locked. Available in iPhone OS 3.0 and later. Declared in AVAudioSession.h. AVAudioSessionCategoryPlayAndRecord

For recording and playback of audio—simultaneous or not—such as for a VOIP (voice over IP) application. This category silences audio from other applications, such as the iPod. You can, however, modify this category to allow mixing by using the kAudioSessionProperty_OverrideCategoryMixWithOthers property. Your audio continues with the Ring/Silent switch set to silent and with the screen locked.

Vanya