Index: remoting/host/audio_capturer_win.cc |
diff --git a/remoting/host/audio_capturer_win.cc b/remoting/host/audio_capturer_win.cc |
index b450a9a543e770582de73cfc94e0c95800b49e33..ce4c5f7c42da4ea34beaf3628eedfaff8260aa31 100644 |
--- a/remoting/host/audio_capturer_win.cc |
+++ b/remoting/host/audio_capturer_win.cc |
@@ -34,6 +34,11 @@ const int kHnsToMs = 10000; |
// silence. A value of 2 was chosen, because Windows can give samples of 1 and |
// -1, even when no audio is playing. |
const int kSilenceThreshold = 2; |
+ |
+// Number of packets that can be stored in the Windows capture buffer. |
+// Even if we capture once every |audio_device_period_| * |kWindowsBufferSize|, |
+// we will buffer enough to avoid glitches. |
+const int kWindowsBufferSize = 10; |
Wez
2012/08/15 21:32:29
Why 10? Surely we want to configure things to cope
kxing
2012/08/16 17:30:57
Done.
|
} // namespace |
namespace remoting { |
@@ -195,7 +200,7 @@ bool AudioCapturerWin::Start(const PacketCapturedCallback& callback) { |
// Initialize the IAudioClient. |
hr = audio_client_->Initialize(AUDCLNT_SHAREMODE_SHARED, |
AUDCLNT_STREAMFLAGS_LOOPBACK, |
- 0, |
+ device_period * kWindowsBufferSize, |
Sergey Ulanov
2012/08/15 21:43:22
Does this have to be multiple of device_period? Ca
kxing
2012/08/16 17:30:57
Done.
|
0, |
wave_format_ex_, |
NULL); |