diff --git a/configure.ac b/configure.ac index 08e12e5b..19ace667 100644 --- a/configure.ac +++ b/configure.ac @@ -373,6 +373,7 @@ then have_freerdp=yes legacy_freerdp_extensions=no rdpsettings_interface=unknown + rdpsettings_audioplayback=yes rdpsettings_fastpath=yes freerdp_interface=unknown event_interface=unknown @@ -602,6 +603,11 @@ then [rdpsettings_fastpath=no], [[#include ]]) + # Legacy interface may not have AudioPlayback settings + AC_CHECK_MEMBERS([rdpSettings.audio_playback],, + [rdpsettings_audioplayback=no], + [[#include ]]) + elif test "x${rdpsettings_interface}" = "xunknown"; then AC_MSG_WARN([ -------------------------------------------- @@ -618,6 +624,12 @@ if test "x${have_freerdp}" = "xyes" -a "x${rdpsettings_fastpath}" = "xyes"; then [Whether the rdpSettings structure has FastPath settings]) fi +# Activate audio playback settings if present +if test "x${have_freerdp}" = "xyes" -a "x${rdpsettings_audioplayback}" = "xyes"; then + AC_DEFINE([HAVE_RDPSETTINGS_AUDIOPLAYBACK],, + [Whether the rdpSettings structure has AudioPlayback settings]) +fi + # Check if the type CHANNEL_ENTRY_POINTS_FREERDP exists, if not define it to CHANNEL_ENTRY_POINTS_EX if test "x${have_freerdp}" = "xyes" then diff --git a/src/protocols/rdp/rdp_settings.c b/src/protocols/rdp/rdp_settings.c index e4900f17..ce09d539 100644 --- a/src/protocols/rdp/rdp_settings.c +++ b/src/protocols/rdp/rdp_settings.c @@ -109,9 +109,13 @@ void guac_rdp_push_settings(guac_rdp_settings* guac_settings, freerdp* rdp) { /* Audio */ #ifdef LEGACY_RDPSETTINGS +#ifdef HAVE_RDPSETTINGS_AUDIOPLAYBACK rdp_settings->audio_playback = guac_settings->audio_enabled; +#endif #else +#ifdef HAVE_RDPSETTINGS_AUDIOPLAYBACK rdp_settings->AudioPlayback = guac_settings->audio_enabled; +#endif #endif /* Security */