averagePower(forChannel:)
Returns the average power, in decibels full-scale (dBFS), for an audio channel.
Declaration
func averagePower(forChannel channelNumber: Int) -> FloatParameters
- channelNumber:
The audio channel with the average power value you want to retrieve. Channel numbers are zero-indexed. A monaural signal, or the left channel of a stereo signal, has channel number
0.
Return Value
A floating-point value, in dBFS, that indicates the audio channel’s current average power.
Discussion
Before asking the player for its average power value, you must call updateMeters() to generate the latest data. The returned value ranges from –160 dBFS, indicating minimum power, to 0 dBFS, indicating maximum power.