aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Lucas <chenzo@jitsi.org>2012-10-15 22:08:52 +0000
committerVincent Lucas <chenzo@jitsi.org>2012-10-15 22:08:52 +0000
commit142764ebae8ba33d4959fc8c8c7c2bdac99bd53c (patch)
treed64a2a6b1a02a2f24d5d9d21d11447af7884162c
parent52680ff85f47f9e1e3b3a9d01f1125be187e4d30 (diff)
downloadjitsi-142764ebae8ba33d4959fc8c8c7c2bdac99bd53c.zip
jitsi-142764ebae8ba33d4959fc8c8c7c2bdac99bd53c.tar.gz
jitsi-142764ebae8ba33d4959fc8c8c7c2bdac99bd53c.tar.bz2
Improves sound device selection: automatically switches to new plugged device, remember user preferences in a list.
-rw-r--r--lib/installer-exclude/libjitsi.jarbin991794 -> 994876 bytes
-rw-r--r--src/net/java/sip/communicator/impl/neomedia/DeviceConfigurationComboBoxModel.java50
-rw-r--r--src/net/java/sip/communicator/impl/neomedia/MediaConfigurationImpl.java3
3 files changed, 31 insertions, 22 deletions
diff --git a/lib/installer-exclude/libjitsi.jar b/lib/installer-exclude/libjitsi.jar
index 0b8e805..a275fda 100644
--- a/lib/installer-exclude/libjitsi.jar
+++ b/lib/installer-exclude/libjitsi.jar
Binary files differ
diff --git a/src/net/java/sip/communicator/impl/neomedia/DeviceConfigurationComboBoxModel.java b/src/net/java/sip/communicator/impl/neomedia/DeviceConfigurationComboBoxModel.java
index 1130c82..9eb42da 100644
--- a/src/net/java/sip/communicator/impl/neomedia/DeviceConfigurationComboBoxModel.java
+++ b/src/net/java/sip/communicator/impl/neomedia/DeviceConfigurationComboBoxModel.java
@@ -223,26 +223,24 @@ public class DeviceConfigurationComboBoxModel
{
case AUDIO_CAPTURE:
audioSystem = deviceConfiguration.getAudioSystem();
- infos
- = (audioSystem == null)
+ infos = (audioSystem == null)
? null
- : audioSystem.getCaptureDevices();
+ : audioSystem.getDevices(AudioSystem.CAPTURE_INDEX);
break;
case AUDIO_NOTIFY:
audioSystem = deviceConfiguration.getAudioSystem();
- infos
- = (audioSystem == null) ? null : audioSystem.getNotifyDevices();
+ infos = (audioSystem == null)
+ ? null
+ : audioSystem.getDevices(AudioSystem.NOTIFY_INDEX);
break;
case AUDIO_PLAYBACK:
audioSystem = deviceConfiguration.getAudioSystem();
- infos
- = (audioSystem == null)
+ infos = (audioSystem == null)
? null
- : audioSystem.getPlaybackDevices();
+ : audioSystem.getDevices(AudioSystem.PLAYBACK_INDEX);
break;
case VIDEO:
- infos
- = deviceConfiguration.getAvailableVideoCaptureDevices(
+ infos = deviceConfiguration.getAvailableVideoCaptureDevices(
MediaUseCase.CALL);
break;
default:
@@ -273,20 +271,21 @@ public class DeviceConfigurationComboBoxModel
{
case AUDIO_CAPTURE:
audioSystem = deviceConfiguration.getAudioSystem();
- info
- = (audioSystem == null) ? null : audioSystem.getCaptureDevice();
+ info = (audioSystem == null)
+ ? null
+ : audioSystem.getDevice(AudioSystem.CAPTURE_INDEX);
break;
case AUDIO_NOTIFY:
audioSystem = deviceConfiguration.getAudioSystem();
- info
- = (audioSystem == null) ? null : audioSystem.getNotifyDevice();
+ info = (audioSystem == null)
+ ? null
+ : audioSystem.getDevice(AudioSystem.NOTIFY_INDEX);
break;
case AUDIO_PLAYBACK:
audioSystem = deviceConfiguration.getAudioSystem();
- info
- = (audioSystem == null)
- ? null
- : audioSystem.getPlaybackDevice();
+ info = (audioSystem == null)
+ ? null
+ : audioSystem.getDevice(AudioSystem.PLAYBACK_INDEX);
break;
case VIDEO:
info = deviceConfiguration.getVideoCaptureDevice(MediaUseCase.ANY);
@@ -354,17 +353,26 @@ public class DeviceConfigurationComboBoxModel
case AUDIO_CAPTURE:
audioSystem = deviceConfiguration.getAudioSystem();
if (audioSystem != null)
- audioSystem.setCaptureDevice(device.info, true);
+ audioSystem.setDevice(
+ AudioSystem.CAPTURE_INDEX,
+ device.info,
+ true);
break;
case AUDIO_NOTIFY:
audioSystem = deviceConfiguration.getAudioSystem();
if (audioSystem != null)
- audioSystem.setNotifyDevice(device.info, true);
+ audioSystem.setDevice(
+ AudioSystem.NOTIFY_INDEX,
+ device.info,
+ true);
break;
case AUDIO_PLAYBACK:
audioSystem = deviceConfiguration.getAudioSystem();
if (audioSystem != null)
- audioSystem.setPlaybackDevice(device.info, true);
+ audioSystem.setDevice(
+ AudioSystem.PLAYBACK_INDEX,
+ device.info,
+ true);
break;
case VIDEO:
deviceConfiguration.setVideoCaptureDevice(device.info, true);
diff --git a/src/net/java/sip/communicator/impl/neomedia/MediaConfigurationImpl.java b/src/net/java/sip/communicator/impl/neomedia/MediaConfigurationImpl.java
index a0f8a3f..12e8bae 100644
--- a/src/net/java/sip/communicator/impl/neomedia/MediaConfigurationImpl.java
+++ b/src/net/java/sip/communicator/impl/neomedia/MediaConfigurationImpl.java
@@ -144,7 +144,8 @@ public class MediaConfigurationImpl implements MediaConfigurationService
{
cdi
= soundLevelIndicator.isShowing()
- ? audioSystem.getCaptureDevice()
+ ? audioSystem.getDevice(
+ AudioSystem.CAPTURE_INDEX)
: null;
}
else