public class AudioNotifierServiceImpl extends java.lang.Object implements AudioNotifierService, java.beans.PropertyChangeListener
Constructor and Description |
---|
AudioNotifierServiceImpl()
Initializes a new AudioNotifierServiceImpl instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
audioOutAndNotificationsShareSameDevice()
Checks whether the playback and notification configuration share the same
device.
|
SCAudioClip |
createAudio(java.lang.String uri)
Creates an SCAudioClip from the given URI and adds it to the list of
available audio-s.
|
SCAudioClip |
createAudio(java.lang.String uri,
boolean playback)
Creates an SCAudioClip from the given URI and adds it to the list of
available audio-s.
|
DeviceConfiguration |
getDeviceConfiguration()
The device configuration.
|
boolean |
isMute()
Returns true if the sound is currently disabled; false,
otherwise.
|
void |
propertyChange(java.beans.PropertyChangeEvent ev)
Listens for changes in notify device.
|
void |
setMute(boolean mute)
Enables or disables the sound in the application.
|
public AudioNotifierServiceImpl()
public boolean audioOutAndNotificationsShareSameDevice()
audioOutAndNotificationsShareSameDevice
in interface AudioNotifierService
public SCAudioClip createAudio(java.lang.String uri)
createAudio
in interface AudioNotifierService
uri
- the path where the audio file could be foundpublic SCAudioClip createAudio(java.lang.String uri, boolean playback)
createAudio
in interface AudioNotifierService
uri
- the path where the audio file could be foundplayback
- use or not the playback device.public DeviceConfiguration getDeviceConfiguration()
public boolean isMute()
isMute
in interface AudioNotifierService
public void propertyChange(java.beans.PropertyChangeEvent ev)
propertyChange
in interface java.beans.PropertyChangeListener
ev
- the event that notify device has changed.public void setMute(boolean mute)
setMute
in interface AudioNotifierService
mute
- when true disables the sound; otherwise, enables the
sound.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.