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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With