Search code examples
iphoneobjective-ciosxcodebackground-music

Background iPod music Volume mixed with sound effects


What would the best method be for mixing background iPod music with sound effects? The sound effects need to be adjustable and sometimes much louder than the background music. When I use MPMusicPlayerController the volume is system-wide and reduces the effects volume as well. I have been reading about AVPlayer and AVAudipPlayer but can't seem to locate a viable solution.

Any help and suggestions would be greatly appreciated.


Solution

  • Have you looked at AVAudioSession Categories? I think that could help you with your problem. The docs at Apple.