Adding some casts to get rid of Xcode warnings.
Adding level metering APIs, similar to those in AVAudioPlayer.