|
|
|
|
@ -753,13 +753,21 @@ else if(name.equals(AUDIO_SYSTEM_JAVASOUND))
|
|
|
|
|
}
|
|
|
|
|
else if(name.equals(AUDIO_SYSTEM_PORTAUDIO))
|
|
|
|
|
{
|
|
|
|
|
// firts get anyconfig before we change it
|
|
|
|
|
// first get any config before we change it
|
|
|
|
|
String audioNotifyDevName =
|
|
|
|
|
config.getString(PROP_AUDIO_NOTIFY_DEVICE);
|
|
|
|
|
|
|
|
|
|
String audioPlaybackDevName =
|
|
|
|
|
config.getString(PROP_AUDIO_PLAYBACK_DEVICE);
|
|
|
|
|
|
|
|
|
|
if(logger.isDebugEnabled())
|
|
|
|
|
{
|
|
|
|
|
logger.debug("Portaudio: Found stored notify device: ["
|
|
|
|
|
+ audioNotifyDevName + "]");
|
|
|
|
|
logger.debug("Portaudio: Found stored playback device: ["
|
|
|
|
|
+ audioPlaybackDevName + "]");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// changed to portaudio, so lets first set the default devices
|
|
|
|
|
setAudioPlaybackDevice(PortAudioAuto.defaultPlaybackDevice, save);
|
|
|
|
|
setAudioNotifyDevice(PortAudioAuto.defaultPlaybackDevice, save);
|
|
|
|
|
@ -769,37 +777,37 @@ else if(name.equals(AUDIO_SYSTEM_PORTAUDIO))
|
|
|
|
|
if(captureDevice != null)
|
|
|
|
|
{
|
|
|
|
|
this.audioCaptureDevice = captureDevice;
|
|
|
|
|
}
|
|
|
|
|
else // no capture device specified save default
|
|
|
|
|
setAudioCaptureDevice(PortAudioAuto.defaultCaptureDevice, save);
|
|
|
|
|
|
|
|
|
|
if(audioNotifyDevName != null)
|
|
|
|
|
if(audioNotifyDevName != null)
|
|
|
|
|
{
|
|
|
|
|
for (CaptureDeviceInfo captureDeviceInfo :
|
|
|
|
|
PortAudioAuto.playbackDevices)
|
|
|
|
|
{
|
|
|
|
|
for (CaptureDeviceInfo captureDeviceInfo :
|
|
|
|
|
PortAudioAuto.playbackDevices)
|
|
|
|
|
if (audioNotifyDevName.equals(
|
|
|
|
|
captureDeviceInfo.getName()))
|
|
|
|
|
{
|
|
|
|
|
if (audioNotifyDevName.equals(
|
|
|
|
|
captureDeviceInfo.getName()))
|
|
|
|
|
{
|
|
|
|
|
setAudioNotifyDevice(captureDeviceInfo, save);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
setAudioNotifyDevice(captureDeviceInfo, save);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(audioPlaybackDevName != null)
|
|
|
|
|
if(audioPlaybackDevName != null)
|
|
|
|
|
{
|
|
|
|
|
for (CaptureDeviceInfo captureDeviceInfo :
|
|
|
|
|
PortAudioAuto.playbackDevices)
|
|
|
|
|
{
|
|
|
|
|
for (CaptureDeviceInfo captureDeviceInfo :
|
|
|
|
|
PortAudioAuto.playbackDevices)
|
|
|
|
|
if (audioPlaybackDevName.equals(
|
|
|
|
|
captureDeviceInfo.getName()))
|
|
|
|
|
{
|
|
|
|
|
if (audioPlaybackDevName.equals(
|
|
|
|
|
captureDeviceInfo.getName()))
|
|
|
|
|
{
|
|
|
|
|
setAudioPlaybackDevice(captureDeviceInfo, save);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
setAudioPlaybackDevice(captureDeviceInfo, save);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else // no capture device specified save default
|
|
|
|
|
setAudioCaptureDevice(PortAudioAuto.defaultCaptureDevice, save);
|
|
|
|
|
|
|
|
|
|
// return here to prevent clearing the last config that was saved
|
|
|
|
|
return;
|
|
|
|
|
|