summaryrefslogtreecommitdiffstats
path: root/remoting/host/audio_capturer_win.h
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-02 23:11:14 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-02 23:11:14 +0000
commit881de5e56b7123fba063e526117cce5fb9da8762 (patch)
tree8500b1bcbcc11e64ae5ce90e54aa7b7cd6ae719d /remoting/host/audio_capturer_win.h
parent9b0b79a09e4e16c23dd81fde3710804703d81bc0 (diff)
downloadchromium_src-881de5e56b7123fba063e526117cce5fb9da8762.zip
chromium_src-881de5e56b7123fba063e526117cce5fb9da8762.tar.gz
chromium_src-881de5e56b7123fba063e526117cce5fb9da8762.tar.bz2
Better silence detection in audio capturers
Previously audio capturers were dropping silent packets too aggressively and that would disrupt playback on the client side when there are short silence pauses in the stream. BUG=164308 Review URL: https://codereview.chromium.org/11694002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174886 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/audio_capturer_win.h')
-rw-r--r--remoting/host/audio_capturer_win.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/remoting/host/audio_capturer_win.h b/remoting/host/audio_capturer_win.h
index ad3ddea..771cf20 100644
--- a/remoting/host/audio_capturer_win.h
+++ b/remoting/host/audio_capturer_win.h
@@ -14,6 +14,7 @@
#include "base/win/scoped_co_mem.h"
#include "base/win/scoped_comptr.h"
#include "remoting/host/audio_capturer.h"
+#include "remoting/host/audio_silence_detector.h"
#include "remoting/proto/audio.pb.h"
namespace remoting {
@@ -28,8 +29,6 @@ class AudioCapturerWin : public AudioCapturer {
virtual void Stop() OVERRIDE;
virtual bool IsStarted() OVERRIDE;
- static bool IsPacketOfSilence(const int16* samples, int number_of_samples);
-
private:
// Receives all packets from the audio capture endpoint buffer and pushes them
// to the network.
@@ -42,6 +41,8 @@ class AudioCapturerWin : public AudioCapturer {
scoped_ptr<base::RepeatingTimer<AudioCapturerWin> > capture_timer_;
base::TimeDelta audio_device_period_;
+ AudioSilenceDetector silence_detector_;
+
base::win::ScopedCoMem<WAVEFORMATEX> wave_format_ex_;
base::win::ScopedComPtr<IAudioCaptureClient> audio_capture_client_;
base::win::ScopedComPtr<IAudioClient> audio_client_;