GUACAMOLE-25: Set AudioCapture flag if audio input is enabled.

This commit is contained in:
Michael Jumper 2016-04-16 21:42:31 -07:00
parent 36cc9f492f
commit 4fdcfebf25
2 changed files with 23 additions and 0 deletions

View File

@ -436,6 +436,7 @@ then
have_freerdp=yes
legacy_freerdp_extensions=no
rdpsettings_interface=unknown
rdpsettings_audiocapture=yes
rdpsettings_audioplayback=yes
rdpsettings_deviceredirection=yes
freerdp_interface=unknown
@ -686,6 +687,11 @@ then
[rdpsettings_audioplayback=no],
[[#include <freerdp/freerdp.h>]])
# Legacy interface may not have AudioCapture settings
AC_CHECK_MEMBERS([rdpSettings.audio_capture],,
[rdpsettings_audiocapture=no],
[[#include <freerdp/freerdp.h>]])
# Legacy interface may not have DeviceRedirection settings
AC_CHECK_MEMBERS([rdpSettings.device_redirection],,
[rdpsettings_deviceredirection=no],
@ -707,6 +713,12 @@ if test "x${have_freerdp}" = "xyes" -a "x${rdpsettings_audioplayback}" = "xyes";
[Whether the rdpSettings structure has AudioPlayback settings])
fi
# Activate audio capture settings if present
if test "x${have_freerdp}" = "xyes" -a "x${rdpsettings_audiocapture}" = "xyes"; then
AC_DEFINE([HAVE_RDPSETTINGS_AUDIOCAPTURE],,
[Whether the rdpSettings structure has AudioCapture settings])
fi
# Activate device redirection settings if present
if test "x${have_freerdp}" = "xyes" -a "x${rdpsettings_deviceredirection}" = "xyes"; then
AC_DEFINE([HAVE_RDPSETTINGS_DEVICEREDIRECTION],,

View File

@ -993,6 +993,17 @@ void guac_rdp_push_settings(guac_rdp_settings* guac_settings, freerdp* rdp) {
#ifdef HAVE_RDPSETTINGS_AUDIOPLAYBACK
rdp_settings->AudioPlayback = guac_settings->audio_enabled;
#endif
#endif
/* Audio capture */
#ifdef LEGACY_RDPSETTINGS
#ifdef HAVE_RDPSETTINGS_AUDIOCAPTURE
rdp_settings->audio_capture = guac_settings->enable_audio_input;
#endif
#else
#ifdef HAVE_RDPSETTINGS_AUDIOCAPTURE
rdp_settings->AudioCapture = guac_settings->enable_audio_input;
#endif
#endif
/* Device redirection */