Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Unified Diff: remoting/host/audio_capturer_win.h

Issue 1753663002: Add volume control for windows host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolve code review comments Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/host/audio_capturer_win.cc » ('j') | remoting/host/audio_capturer_win.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/audio_capturer_win.h
diff --git a/remoting/host/audio_capturer_win.h b/remoting/host/audio_capturer_win.h
index de3c7953229704ee612ac08ff1d30385549d61cb..30f5dd9f2beff01866ddf88312580c354cccd760 100644
--- a/remoting/host/audio_capturer_win.h
+++ b/remoting/host/audio_capturer_win.h
@@ -33,6 +33,16 @@ class AudioCapturerWin : public AudioCapturer {
// to the network.
void DoCapture();
+ // Returns current volume setting of the host, in range [0.0, 1.0]. If the
+ // audio has been muted, this function returns 0. If Windows API returns error
+ // (such as audio device has been disabled or unpluged), this function ignores
+ // host volume setting, and returns 1.0.
+ float GetAudioLevel();
joedow 2016/03/04 16:46:10 Neither of the new methods change internal state s
Sergey Ulanov 2016/03/04 21:30:03 Actually GetAudioLevel() doesn't even need to be a
Hzj_jie 2016/03/09 19:47:57 GetAudioLevel uses audio_volume_, ScopedComPtr<ISi
+
+ // Processes a series of samples, and executes callback if the packet is
+ // qualified to be sent to client.
+ void ProcessSamples(BYTE* data, UINT32 frames, DWORD flags);
Sergey Ulanov 2016/03/04 21:30:03 BYTE, UINT32, DWORD are all windows specific types
Hzj_jie 2016/03/09 19:47:57 Done.
+
PacketCapturedCallback callback_;
AudioPacket::SamplingRate sampling_rate_;
@@ -46,6 +56,7 @@ class AudioCapturerWin : public AudioCapturer {
base::win::ScopedComPtr<IAudioCaptureClient> audio_capture_client_;
base::win::ScopedComPtr<IAudioClient> audio_client_;
base::win::ScopedComPtr<IMMDevice> mm_device_;
+ base::win::ScopedComPtr<ISimpleAudioVolume> audio_volume_;
HRESULT last_capture_error_;
« no previous file with comments | « no previous file | remoting/host/audio_capturer_win.cc » ('j') | remoting/host/audio_capturer_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698