aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator
diff options
context:
space:
mode:
authorDamian Minkov <damencho@jitsi.org>2012-10-17 16:50:23 +0000
committerDamian Minkov <damencho@jitsi.org>2012-10-17 16:50:23 +0000
commita754cc94e0a1a37bb2b590b31d72b1637ec2d9da (patch)
tree9a4fac2f152e52b9b49c742b89963ebe30ceb164 /src/net/java/sip/communicator
parent69dd87877525c01de60cb419c54c3aecb89e5391 (diff)
downloadjitsi-a754cc94e0a1a37bb2b590b31d72b1637ec2d9da.zip
jitsi-a754cc94e0a1a37bb2b590b31d72b1637ec2d9da.tar.gz
jitsi-a754cc94e0a1a37bb2b590b31d72b1637ec2d9da.tar.bz2
Fixes double playing of audio notification if notification and playback device are the same.
Diffstat (limited to 'src/net/java/sip/communicator')
-rw-r--r--src/net/java/sip/communicator/impl/notification/SoundNotificationHandlerImpl.java29
1 files changed, 24 insertions, 5 deletions
diff --git a/src/net/java/sip/communicator/impl/notification/SoundNotificationHandlerImpl.java b/src/net/java/sip/communicator/impl/notification/SoundNotificationHandlerImpl.java
index 4cc045b..507353d 100644
--- a/src/net/java/sip/communicator/impl/notification/SoundNotificationHandlerImpl.java
+++ b/src/net/java/sip/communicator/impl/notification/SoundNotificationHandlerImpl.java
@@ -49,14 +49,33 @@ public class SoundNotificationHandlerImpl
if(isMute())
return;
- if(action.isSoundNotificationEnabled())
+ boolean playOnlyOnPlayback = true;
+
+ AudioNotifierService audioNotifService
+ = NotificationActivator.getAudioNotifier();
+ if(audioNotifService != null)
+ playOnlyOnPlayback =
+ audioNotifService.audioOutAndNotificationsShareSameDevice();
+
+ if(playOnlyOnPlayback)
{
- play(action, data, false);
+ if(action.isSoundNotificationEnabled()
+ || action.isSoundPlaybackEnabled())
+ {
+ play(action, data, true);
+ }
}
-
- if(action.isSoundPlaybackEnabled())
+ else
{
- play(action, data, true);
+ if(action.isSoundNotificationEnabled())
+ {
+ play(action, data, false);
+ }
+
+ if(action.isSoundPlaybackEnabled())
+ {
+ play(action, data, true);
+ }
}
if(action.isSoundPCSpeakerEnabled())