Interface SimpleAudioLevelListener


  • public interface SimpleAudioLevelListener
    A very simple listener that delivers int values every time the audio level of an audio source changes.
    Author:
    Emil Ivov
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int MAX_LEVEL
      The maximum level that can be reported for a participant in a conference.
      static int MIN_LEVEL
      The maximum (zero) level that can be reported for a participant in a conference.
    • Field Detail

      • MAX_LEVEL

        static final int MAX_LEVEL
        The maximum level that can be reported for a participant in a conference. Level values should be distributed between MAX_LEVEL and MIN_LEVEL in a way that would appear uniform to users.

        Note: The value of 127 is specifically chosen as the value of MAX_LEVEL because (1) we transport the levels within RTP and it gives us a signed byte for it, and (2) the range of [0, 127] is pretty good to directly express the sound pressure level decibels as heard by humans in Earth's atmosphere.

        See Also:
        Constant Field Values
      • MIN_LEVEL

        static final int MIN_LEVEL
        The maximum (zero) level that can be reported for a participant in a conference. Level values should be distributed among MAX_LEVEL and MIN_LEVEL in a way that would appear uniform to users.

        Note: The value of 0 is specifically chosen as the value of MIN_LEVEL because (1) we transport the levels within RTP and it gives us a signed byte for it, and (2) the range of [0, 127] is pretty good to directly express the sound pressure level decibels as heard by humans in Earth's atmosphere.

        See Also:
        Constant Field Values
    • Method Detail

      • audioLevelChanged

        void audioLevelChanged​(int level)
        Indicates a new audio level for the source that this listener was registered with.
        Parameters:
        level - the new/current level of the audio source that this listener is registered with.