I work with AVAudioPlayer on an iPad (original version) running iOS 4.3.3
The documentation for the volume property states:
"Playable gain for the audio player, from 0.0 to 1.0.
Curiously, this allows you to use a value> 1.0 with the expected effect (the volume increases accordingly). This means that if you play a quieter track, you can (for example) mix it with volume 2.0 with the line
[myPlayer setVolume:2.0]
Reading a volume property returns 2.0 as the current value.
so my question is: is this an error in the documentation or an error that we can expect in future versions?
This is a really useful feature, but it has the potential to increase the playback volume to “above zero” if there are samples in the audio being played that, when multiplied by the volume, exceed the supported bit resolution. In my application, I plan to use it for match level playback levels after scanning the sound.
Otherwise, I will need to turn off the “loud” tracks to the specified nominal zero value, and not turn off the “silent” tracks. It makes sense to increase the volume of the quieter tracks to the actual “zero”, thereby providing a more general dynamic range.
source share