Package org.jitsi.impl.neomedia.notify
Class AudioNotifierServiceImpl
- java.lang.Object
-
- org.jitsi.impl.neomedia.notify.AudioNotifierServiceImpl
-
- All Implemented Interfaces:
PropertyChangeListener,EventListener,AudioNotifierService
public class AudioNotifierServiceImpl extends Object implements AudioNotifierService, PropertyChangeListener
The implementation of AudioNotifierService.- Author:
- Yana Stamcheva, Lyubomir Marinov
-
-
Constructor Summary
Constructors Constructor Description AudioNotifierServiceImpl()Initializes a new AudioNotifierServiceImpl instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaudioOutAndNotificationsShareSameDevice()Checks whether the playback and notification configuration share the same device.SCAudioClipcreateAudio(String uri)Creates an SCAudioClip from the given URI and adds it to the list of available audio-s.SCAudioClipcreateAudio(String uri, boolean playback)Creates an SCAudioClip from the given URI and adds it to the list of available audio-s.DeviceConfigurationgetDeviceConfiguration()The device configuration.booleanisMute()Returns true if the sound is currently disabled; false, otherwise.voidpropertyChange(PropertyChangeEvent ev)Listens for changes in notify device.voidsetMute(boolean mute)Enables or disables the sound in the application.
-
-
-
Method Detail
-
audioOutAndNotificationsShareSameDevice
public boolean audioOutAndNotificationsShareSameDevice()
Checks whether the playback and notification configuration share the same device.- Specified by:
audioOutAndNotificationsShareSameDevicein interfaceAudioNotifierService- Returns:
- are audio out and notifications using the same device.
-
createAudio
public SCAudioClip createAudio(String uri)
Creates an SCAudioClip from the given URI and adds it to the list of available audio-s. Uses notification device if any.- Specified by:
createAudioin interfaceAudioNotifierService- Parameters:
uri- the path where the audio file could be found- Returns:
- a newly created SCAudioClip from uri
-
createAudio
public SCAudioClip createAudio(String uri, boolean playback)
Creates an SCAudioClip from the given URI and adds it to the list of available audio-s.- Specified by:
createAudioin interfaceAudioNotifierService- Parameters:
uri- the path where the audio file could be foundplayback- use or not the playback device.- Returns:
- a newly created SCAudioClip from uri
-
getDeviceConfiguration
public DeviceConfiguration getDeviceConfiguration()
The device configuration.- Returns:
- the deviceConfiguration
-
isMute
public boolean isMute()
Returns true if the sound is currently disabled; false, otherwise.- Specified by:
isMutein interfaceAudioNotifierService- Returns:
- true if the sound is currently disabled; false, otherwise
-
propertyChange
public void propertyChange(PropertyChangeEvent ev)
Listens for changes in notify device.- Specified by:
propertyChangein interfacePropertyChangeListener- Parameters:
ev- the event that notify device has changed.
-
setMute
public void setMute(boolean mute)
Enables or disables the sound in the application. If false, we try to restore all looping sounds if any.- Specified by:
setMutein interfaceAudioNotifierService- Parameters:
mute- when true disables the sound; otherwise, enables the sound.
-
-