Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.protocol.event
Class SoundLevelChangeEvent

java.lang.Object
  extended by java.util.EventObject
      extended by net.java.sip.communicator.service.protocol.event.SoundLevelChangeEvent
All Implemented Interfaces:
Serializable

public class SoundLevelChangeEvent
extends EventObject

SoundLevelChangeEvents are triggered whenever a change occurs in the sound level of the audio stream coming from a certain CallPeer.

In the case of a CallPeer, which is also a conference focus and is participating in the conference as a ConferenceMember the level would be the aggregated level of all ConferenceMembers levels including the one corresponding to the peer itself.

In the case of a CallPeer, which is also a conference focus, but is NOT participating in the conference as a ConferenceMember (server) the level would be the aggregated level of all attached ConferenceMembers.

Author:
Yana Stamcheva
See Also:
Serialized Form

Field Summary
static int MAX_LEVEL
          The maximum level that can be reported for a participant.
static int MIN_LEVEL
          The maximum (zero) level that can be reported for a participant.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
SoundLevelChangeEvent(Object source, int level)
          Creates an StreamSoundLevelEvent for the given callPeer by indicating the current sound level of the audio stream.
 
Method Summary
 int getLevel()
          Returns the current sound level of the audio stream.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_LEVEL

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

Warning: The value should be equal to net.java.sip.communicator.service.neomedia.event.SimpleAudioLevelListener#MAX_VALUE because we do not currently perform a conversion from the SimpleAudioLevelListener range to the SoundLevelChangeEvent range when we fire the event.

See Also:
Constant Field Values

MIN_LEVEL

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

Warning: The value should be equal to net.java.sip.communicator.service.neomedia.event.SimpleAudioLevelListener#MIN_VALUE because we do not currently perform a conversion from the SimpleAudioLevelListener range to the SoundLevelChangeEvent range when we fire the event.

See Also:
Constant Field Values
Constructor Detail

SoundLevelChangeEvent

public SoundLevelChangeEvent(Object source,
                             int level)
Creates an StreamSoundLevelEvent for the given callPeer by indicating the current sound level of the audio stream.

Parameters:
source - the source from which the change is received
level - the current sound level of the audio stream
Method Detail

getLevel

public int getLevel()
Returns the current sound level of the audio stream.

Returns:
the current sound level of the audio stream

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.