src/net/java/sip/communicator/service/protocol/media/MediaAwareCall.java
/**
     * Adds a specific <tt>SoundLevelListener</tt> to the list of
     * listeners interested in and notified about changes in local sound level
     * related information. When the first listener is being registered the
     * method also registers its single listener with the call peer media
     * handlers so that it would receive level change events and delegate them
     * to the listeners that have registered with us.
     *
     * @param l the <tt>SoundLevelListener</tt> to add
     */
Adds a specific SoundLevelListener to the list of
listeners interested in and notified about changes in local sound level
related information. When the first listener is being registered the
method also registers its single listener with the call peer media
handlers so that it would receive level change events and delegate them
to the listeners that have registered with us.

@param l the SoundLevelListener to add
Adds a specific SoundLevelListener to the list of listeners interested in and notified about changes in local sound level related information . When the first listener is being registered the method also registers its single listener with the call peer media handlers so that it would receive level change events and delegate them to the listeners that have registered with us . @param l the SoundLevelListener to add
@Override
    public void addLocalUserSoundLevelListener(SoundLevelListener l)
    {
        synchronized (localUserAudioLevelListenersSyncRoot)
        {
            if ((localUserAudioLevelListeners == null)
                    || localUserAudioLevelListeners.isEmpty())
            {
                /*
                 * If this is the first listener that's being registered, we
                 * also need to register ourselves as an audio level listener
                 * with the MediaHandler. We do this so that audio level would
                 * only be calculated if anyone is interested in receiving them.
                 */
                Iterator<T> callPeerIter = getCallPeers();
                while (callPeerIter.hasNext())
                {
                    callPeerIter
                        .next()
                            .getMediaHandler()
                                .setLocalUserAudioLevelListener(
                                        localAudioLevelDelegator);
                }
            }
            /*
             * Implement localUserAudioLevelListeners as a copy-on-write storage
             * so that iterators over it can iterate without
             * ConcurrentModificationExceptions.
             */
            localUserAudioLevelListeners
                = (localUserAudioLevelListeners == null)
                    ? new ArrayList<SoundLevelListener>()
                    : new ArrayList<SoundLevelListener>(
                            localUserAudioLevelListeners);
            localUserAudioLevelListeners.add(l);
        }
    }
@ Override public void addLocalUserSoundLevelListener ( SoundLevelListener l ) { synchronized ( localUserAudioLevelListenersSyncRoot ) { if ( ( localUserAudioLevelListeners == null ) || localUserAudioLevelListeners . isEmpty ( ) ) { /*
                 * If this is the first listener that's being registered, we
                 * also need to register ourselves as an audio level listener
                 * with the MediaHandler. We do this so that audio level would
                 * only be calculated if anyone is interested in receiving them.
                 */ Iterator < T > callPeerIter = getCallPeers ( ) ; while ( callPeerIter . hasNext ( ) ) { callPeerIter . next ( ) . getMediaHandler ( ) . setLocalUserAudioLevelListener ( localAudioLevelDelegator ) ; } } /*
             * Implement localUserAudioLevelListeners as a copy-on-write storage
             * so that iterators over it can iterate without
             * ConcurrentModificationExceptions.
             */ localUserAudioLevelListeners = ( localUserAudioLevelListeners == null ) ? new ArrayList < SoundLevelListener > ( ) : new ArrayList < SoundLevelListener > ( localUserAudioLevelListeners ) ; localUserAudioLevelListeners . add ( l ) ; } }
Adds a specific <tt>SoundLevelListener</tt> to the list of
 listeners interested in and notified about changes in local sound level
 related information.
Adds a specific <tt > SoundLevelListener< / tt > to the list of listeners interested in and notified about changes in local sound level related information .