diff options
author | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-06 02:53:07 +0000 |
---|---|---|
committer | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-06 02:53:07 +0000 |
commit | 32c0a769e38711f707ca760652f44b14dea36620 (patch) | |
tree | 67529fcfd47bb03dc3a6e71a388911aca5832cec /remoting/host | |
parent | f8d87d3aa72e8a5575c921ed7764c7478f7d54d2 (diff) | |
download | chromium_src-32c0a769e38711f707ca760652f44b14dea36620.zip chromium_src-32c0a769e38711f707ca760652f44b14dea36620.tar.gz chromium_src-32c0a769e38711f707ca760652f44b14dea36620.tar.bz2 |
Disable audio in an RDP session.
Capturing audio using IAudioCaptureClient in an RDP session garbles the sound. This seems to be caused by a bug in the OS. This CL disables audio in an RDP session until we find a better way of capturing audio.
BUG=242312
Review URL: https://chromiumcodereview.appspot.com/16359013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204397 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host')
-rw-r--r-- | remoting/host/win/rdp_client_window.cc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/remoting/host/win/rdp_client_window.cc b/remoting/host/win/rdp_client_window.cc index e9bcdac..787f8d2 100644 --- a/remoting/host/win/rdp_client_window.cc +++ b/remoting/host/win/rdp_client_window.cc @@ -39,6 +39,18 @@ const int kKeyboardStateLength = 256; // The RDP control creates 'IHWindowClass' window to handle keyboard input. const wchar_t kRdpInputWindowClass[] = L"IHWindowClass"; +enum RdpAudioMode { + // Redirect sounds to the client. This is the default value. + kRdpAudioModeRedirect = 0, + + // Play sounds at the remote computer. Equivalent to |kRdpAudioModeNone| if + // the remote computer is running a server SKU. + kRdpAudioModePlayOnServer = 1, + + // Disable sound redirection; do not play sounds at the remote computer. + kRdpAudioModeNone = 2 +}; + // Points to a per-thread instance of the window activation hook handle. base::LazyInstance<base::ThreadLocalPointer<RdpClientWindow::WindowHook> > g_window_hook = LAZY_INSTANCE_INITIALIZER; @@ -224,6 +236,7 @@ LRESULT RdpClientWindow::OnCreate(CREATESTRUCT* create_struct) { CAxWindow2 activex_window; base::win::ScopedComPtr<IUnknown> control; HRESULT result = E_FAIL; + base::win::ScopedComPtr<mstsc::IMsRdpClientSecuredSettings> secured_settings; base::win::ScopedBstr server_name( UTF8ToUTF16(server_endpoint_.ToStringWithoutPort()).c_str()); @@ -323,6 +336,16 @@ LRESULT RdpClientWindow::OnCreate(CREATESTRUCT* create_struct) { if (FAILED(result)) goto done; + // Disable audio in the session. + // TODO(alexeypa): re-enable audio redirection when http://crbug.com/242312 is + // fixed. + result = client_->get_SecuredSettings2(secured_settings.Receive()); + if (SUCCEEDED(result)) { + result = secured_settings->put_AudioRedirectionMode(kRdpAudioModeNone); + if (FAILED(result)) + goto done; + } + result = client_->Connect(); if (FAILED(result)) goto done; |