when I start –exportAsynchronouslyWithCompletionHandler: method of AVassetExportSession my audio is stops playing. I am using AudioQueue and OpenAL they both needs to be restarted after beginning expor开发者_StackOverflow社区t session. Is there any trick to make them work without restarting audios?
Well. Nobody has answered to me, so I will answer myself. Figured that when exporting with AVAssetExportSession it creates its own audio queue therefore it kills my, so before starting my queue all I need is to set some properties to AudioSession.
AudioSessionInitialize(CFRunLoopGetCurrent(),
kCFRunLoopCommonModes,
NULL,
NULL);
AudioSessionSetProperty(kAudioSessionProperty_AudioCategory,
sizeof(kAudioSessionCategory_MediaPlayback),
&(int)
{kAudioSessionCategory_MediaPlayback});
AudioSessionSetProperty(kAudioSessionProperty_OverrideCategoryMixWithOthers,
sizeof (UInt32),
&(UInt32)
{1});
AudioSessionSetActive(YES);
精彩评论