From b4e1e9a1bdf9748acd8d97ff2af19d005fa6cf14 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Tue, 30 Jul 2019 12:30:15 +0200 Subject: [PATCH] Fixed loading of microphone channel Ensure microphone channel is loaded if settings require it in freerdp_client_load_addins --- client/common/cmdline.c | 11 +++++++++++ client/common/file.c | 7 +++++++ 2 files changed, 18 insertions(+) diff --git a/client/common/cmdline.c b/client/common/cmdline.c index 4fb5680..6056682 100644 --- a/client/common/cmdline.c +++ b/client/common/cmdline.c @@ -3125,6 +3125,17 @@ BOOL freerdp_client_load_addins(rdpChannels* channels, rdpSettings* settings) return FALSE; } + if (settings->AudioCapture) + { + char* p[] = + { + "audin" + }; + + if (!freerdp_client_add_static_channel(settings, ARRAYSIZE(p), p)) + return FALSE; + } + if ((freerdp_static_channel_collection_find(settings, "rdpsnd")) || (freerdp_dynamic_channel_collection_find(settings, "tsmf"))) { diff --git a/client/common/file.c b/client/common/file.c index 39aa5d8..f3f31ad 100644 --- a/client/common/file.c +++ b/client/common/file.c @@ -789,6 +789,7 @@ BOOL freerdp_client_populate_rdp_file_from_settings(rdpFile* file, const rdpSett file->AudioMode = AUDIO_MODE_NONE; } + SETTING_MODIFIED_SET_BOOL(file->AudioCaptureMode, settings, AudioCapture); SETTING_MODIFIED_SET_STRING(file->GatewayHostname, settings, GatewayHostname); SETTING_MODIFIED_SET_STRING(file->GatewayAccessToken, settings, GatewayAccessToken); SETTING_MODIFIED_SET(file->GatewayUsageMethod, settings, GatewayUsageMethod); @@ -1242,6 +1243,12 @@ BOOL freerdp_client_populate_settings_from_rdp_file(rdpFile* file, rdpSettings* } } + if (~file->AudioCaptureMode) + { + if (!freerdp_settings_set_bool(settings, FreeRDP_AudioCapture, file->AudioCaptureMode != 0)) + return FALSE; + } + if (~file->Compression) { if (!freerdp_settings_set_bool(settings, FreeRDP_CompressionEnabled, file->Compression != 0)) -- 2.7.4