calculateAudioLevel

open fun calculateAudioLevel(samples: Array<Byte>, offset: Int, length: Int): Double

Calculates the audio level of a range of bytes.

Return

The calculated audio level.

Parameters

samples

The audio samples.

offset

The offset from the start of the samples array.

length

The number of samples to process for the calculation.


open fun calculateAudioLevel(samples: Array<Short>, offset: Int, length: Int): Double

Calculates the audio level of a range of shorts.

Return

The calculated audio level.

Parameters

samples

The audio samples.

offset

The offset from the start of the samples array.

length

The number of samples to process for the calculation.