5

I am using MPMusicPlayerController and AVAudioPlayer simultaneously. For audio balancing, I have two volume sliders for MPMusicPlayerController and AVAudioPlayer each. If I mute the MPMusicPlayer volume and increases AVAudioPlayer volume, the overall device volume mutes and I'm not able to hear the AVAudioPlayer sound.

Then, how can I change the MPMusicPlayer volume independently, without affecting the device volume.

BartoszKP
  • 34,786
  • 15
  • 102
  • 130
iPhoneDv
  • 1,969
  • 1
  • 19
  • 34

1 Answers1

1

Prior to iOS 7, there was a volume property on MPMusicPlayer - it was deprecated in iOS7. On AVAudioPlayer there still is a volume property, which you can use to change the instance volume, without affecting the device volume.

Now, in iOS 7, I think you can use:

MPVolumeView

Fluffhead
  • 845
  • 1
  • 9
  • 21