diff --git a/configure.ac b/configure.ac index edd49b84..485c10d3 100644 --- a/configure.ac +++ b/configure.ac @@ -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 ]]) + # Legacy interface may not have AudioCapture settings + AC_CHECK_MEMBERS([rdpSettings.audio_capture],, + [rdpsettings_audiocapture=no], + [[#include ]]) + # 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],, diff --git a/src/protocols/rdp/rdp_settings.c b/src/protocols/rdp/rdp_settings.c index 4f9343c0..82af859b 100644 --- a/src/protocols/rdp/rdp_settings.c +++ b/src/protocols/rdp/rdp_settings.c @@ -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 */