4

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 file output will be a combination of the sound recorded through mic + the background music played through the speaker. But my issue is that the sound of the background music played through the speaker is very low on the final output music.

I have gone through AVCaptureSession and background audio iOS 7 and added the below code in my viewDidLoad, but with no change in volume.

AVAudioSession *session = [AVAudioSession sharedInstance];
[session setCategory:AVAudioSessionCategoryPlayAndRecord  withOptions:AVAudioSessionCategoryOptionMixWithOthers|AVAudioSessionCategoryOptionDefaultToSpeaker error:nil];

How can I increase the volume of the background music in my final output?

TylerH
  • 20,799
  • 66
  • 75
  • 101
Abhijith G
  • 244
  • 1
  • 8

0 Answers0