Class AudioLevelCalculator
- java.lang.Object
-
- org.jitsi.impl.neomedia.audiolevel.AudioLevelCalculator
-
public class AudioLevelCalculator extends Object
Implements the calculation of audio level as defined by RFC 6465 "A Real-time Transport Protocol (RTP) Header Extension for Mixer-to-Client Audio Level Indication".- Author:
- Lyubomir Marinov
-
-
Field Summary
Fields Modifier and Type Field Description static byteMAX_AUDIO_LEVELThe maximum audio level.static byteMIN_AUDIO_LEVELThe minimum audio level.
-
Constructor Summary
Constructors Constructor Description AudioLevelCalculator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static bytecalculateAudioLevel(byte[] samples, int offset, int length)Calculates the audio level of a signal with specific samples.
-
-
-
Field Detail
-
MAX_AUDIO_LEVEL
public static final byte MAX_AUDIO_LEVEL
The maximum audio level.- See Also:
- Constant Field Values
-
MIN_AUDIO_LEVEL
public static final byte MIN_AUDIO_LEVEL
The minimum audio level.- See Also:
- Constant Field Values
-
-
Method Detail
-
calculateAudioLevel
public static byte calculateAudioLevel(byte[] samples, int offset, int length)Calculates the audio level of a signal with specific samples.- Parameters:
samples- the samples of the signal to calculate the audio level ofoffset- the offset in samples in which the samples startlength- the length in bytes of the signal in samples starting at offset- Returns:
- the audio level of the specified signal
-
-