From 38a6027d2959fe04a2e5a62f501b2e7191a7e0e9 Mon Sep 17 00:00:00 2001 From: Sebastien Vincent Date: Thu, 8 Mar 2012 16:43:32 +0000 Subject: [PATCH] When we change audio device during a cross-protocol conference call, it is the first call of the group that will trigger the propertyChange to other calls (because every calls share the first call audio media device and if the first call is not the first notified, we will end up with different audio device amongst the calls). --- .../protocol/media/MediaAwareCall.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/net/java/sip/communicator/service/protocol/media/MediaAwareCall.java b/src/net/java/sip/communicator/service/protocol/media/MediaAwareCall.java index 704011555..843e72fee 100644 --- a/src/net/java/sip/communicator/service/protocol/media/MediaAwareCall.java +++ b/src/net/java/sip/communicator/service/protocol/media/MediaAwareCall.java @@ -1182,6 +1182,13 @@ public void propertyChange(PropertyChangeEvent event) { if (MediaService.DEFAULT_DEVICE.equals(event.getPropertyName())) { + // if we change the device, do it only for the first member + if(getCallGroup() != null && + this != getCallGroup().getCalls().get(0)) + { + return; + } + /* * XXX We only support changing the default audio device at the time * of this writing. @@ -1200,6 +1207,7 @@ public void propertyChange(PropertyChangeEvent event) = ((MediaDeviceWrapper) conferenceAudioMixer) .getWrappedDevice(); } + /* * XXX If MediaService#getDefaultDevice(MediaType, MediaUseCase) * above returns null and its earlier return value was not null, we @@ -1213,6 +1221,25 @@ public void propertyChange(PropertyChangeEvent event) DEFAULT_DEVICE, oldValue, newValue); } + + // now the first member of the group is configured so let's + // configure the others + if(getCallGroup() != null) + { + List calls = getCallGroup().getCalls(); + + for(Call c : calls) + { + if(c == this) + continue; + + MediaAwareCall call = (MediaAwareCall)c; + + call.conferenceAudioMixer = null; + call.propertyChangeSupport.firePropertyChange( + DEFAULT_DEVICE, oldValue, newValue); + } + } } } }