Can I Play an audio while recording a video on iPhone 4?
I'm trying to record a video while the iPhone playback an audio track. as far as i tried, whenever I simulataniously record and play - the camera get stuck. I went over the AVFoundation PG But I could not find a specific answer.
Is it a matter of digging into this framework?
Is it a matter of thread开发者_开发百科ing and multitasking?
thanks
I record both audio and video while playing audio. However, in my setup I am using CoreAudio for audio and AVFoundation for video. You may want to setup the audio session to handle recording and playback. e.g.
AudioSessionInitialize(NULL, NULL, NULL, self);
UInt32 audioCategory = kAudioSessionCategory_PlayAndRecord;
AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(audioCategory), &audioCategory);
AudioSessionSetActive(YES);
精彩评论