public class AudioLevelEventDispatcher extends java.lang.Object
Note that, for performance reasons this class is not 100% thread safe and you should not modify add or remove audio listeners in this dispatcher in the notification thread (i.e. in the thread where you were notified of an audio level change).
|Constructor and Description|
Initializes a new AudioLevelEventDispatcher instance which is to use a specific name for its Thread which is to run the actual audio level calculations and to dispatch to its SimpleAudioLevelListener
|Modifier and Type||Method and Description|
Adds data to be processed.
Sets an AudioLevelMap that this dispatcher could use to cache levels it's measuring in addition to simply delivering them to a listener.
Sets the new listener that will be gathering all events from this dispatcher.
public AudioLevelEventDispatcher(java.lang.String threadName)
public void addData(javax.media.Buffer buffer)
buffer- the data that we'd like to queue for processing.
public void setAudioLevelListener(SimpleAudioLevelListener listener)
listener- the listener that we will be notifying or null if we are to remove it.
public void setAudioLevelCache(AudioLevelMap cache, long ssrc)
cache- the AudioLevelMap where this dispatcher should cache measured results.
ssrc- the SSRC key where entries should be logged
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.