开发者

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);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜