Instance Method


Returns the average power for a given channel, in decibels, for the sound being recorded.


func averagePower(forChannel channelNumber: Int) -> Float



The number of the channel that you want the average power value for.

Return Value

The current average power, in decibels, for the sound being recorded. A return value of 0 dB indicates full scale, or maximum power; a return value of -160 dB indicates minimum power (that is, near silence).

If the signal provided to the audio recorder exceeds ±full scale, then the return value may exceed 0 (that is, it may enter the positive range).


To obtain a current average power value, you must call the updateMeters() method before calling this method.

See Also

Using Audio Level Metering

var isMeteringEnabled: Bool

A Boolean value that indicates whether audio-level metering is enabled.

func updateMeters()

Refreshes the average and peak power values for all channels of an audio recorder.

func peakPower(forChannel: Int)

Returns the peak power for a given channel, in decibels, for the sound being recorded.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software