We are using libjitsi (569) to develop a java8-scala-application with a VoIP-component for Linux (pulseaudio).
Our problem is the correct selection of the audio-device.
At startup we show a selection-window of the active devices (capDevicesList), which we get from:
deviceConfiguration = mediaService.getDeviceConfiguration()
capDevicesList = deviceConfiguration.getAudioSystem.getDevices(AudioSystem.DataFlow.CAPTURE)
The user selects a device (selectedDevice) from capDevicesList, which we set into the AudioSystem:
deviceConfiguration.getAudioSystem.setDevice(AudioSystem.DataFlow.CAPTURE, selectedDevice, true)
The MediaDevice is build like this:
mediaDevice = new AudioMediaDeviceImpl(selectedDevice)
Then we create a MediaStream:
mediaStream = mediaService.createMediaStream(mediaDevice)
If mediaDevice is the only device connected to the computer, everything works fine. But if there's
another device connected, the mediastream doesn't use necessarily mediaDevice. The above procedure of
selecting the device doesn't has any influence on which device will be used.
What we are doing wrong?