I am playing a song in the background of my app (with
You are asking about metering, not volume. See the docs for AVAudioPlayer. You need to use the various APIs for metering such as
Apple provides a sample app that demonstrates this. See the avTouch sample app.
And you can find plenty of discussions here on Stack Overflow. See these search results.