I am writing an application that uses AVAudioPlayers to play sounds, and I need sounds to play on an absolute MAX volume. Yes, you can set the relative volume for AVAudioPlayer , but if the user has the volume of the device, the sound will still play quietly.
I know that Apple says that the volume of the device cannot be overridden, but still Alarm Clock applications can somehow do it there - so there should be a way.
I believe this can be done using sound queues with a call:
AudioQueueSetParameter(aq, kAudioQueueParam_Volume, 1.0);
But my code should use AVAudioPlayer to play sounds, so I don't think this approach would be useful.
There is also a way to use the undocumented MPVolumeView function for this, but apparently someone has already had the application rejected to use this method.
Any other ideas?
source share