In my application I want to record a video with music playing in background. I have achieved this through AVCaptureSession
and AVAudioSession
.
After recording (through headset) my music output will only contain the recorded video sound. Is there any way to combine the music playback with the recorded video so that the final output will contain the music playback + recorded video with sound
I have gone through the following question : StackOverflow and added the below codes in my viewDidLoad but no change in volume.
AVAudioSession *session = [AVAudioSession sharedInstance];
[session setCategory:AVAudioSessionCategoryPlayAndRecord withOptions:AVAudioSessionCategoryOptionMixWithOthers|AVAudioSessionCategoryOptionDefaultToSpeaker error:nil];
But no change on the final result.