1

In iOS, I'm using AVAudioPlayer to change volume:

[avAudioPlayer setVolume:1.0];

where avAudioPlayer is an initialized `AVAudioPlayer instance. The System Volume Change Indicator does not show up.

But when I use the music player of MPMusicPlayerController to set volume, the System Volume Change Indicator shows up:

[[MPMusicPlayerController applicationMusicPlayer] setVolume:1.0];

How to make AVAudioPlayer shows the System Volume Change Indicator?

FYI, the Indicator I'm talking about this:

enter image description here

Raptor
  • 53,206
  • 45
  • 230
  • 366
  • Have you tried anything in this post? http://stackoverflow.com/q/7255006/4475605 – Adrian Dec 07 '15 at 03:34
  • Yes, first, `float vol = [[AVAudioSession sharedInstance] outputVolume];` is read-only. Then, other solutions are about using `MPMusicPlayerController`, which I try to avoid (as I want to make the audio play within the App, not system-wide) – Raptor Dec 07 '15 at 03:38
  • 1
    I guess I found my answer [here](http://stackoverflow.com/a/4859632/188331). In short, it's not possible to do with `AVAudioPlayer` – Raptor Dec 07 '15 at 03:39

0 Answers0