Fixed loading of microphone channel

Ensure microphone channel is loaded if settings require it in freerdp_client_load_addins
This commit is contained in:
Armin Novak 2019-07-30 12:30:15 +02:00
parent fe6a4c5648
commit b4e1e9a1bd
2 changed files with 18 additions and 0 deletions

View File

@ -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")))
{

View File

@ -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))