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

Unified Diff: content/renderer/media/webrtc_local_audio_track.cc

Issue 21183002: Adding key press detection in the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 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
Index: content/renderer/media/webrtc_local_audio_track.cc
diff --git a/content/renderer/media/webrtc_local_audio_track.cc b/content/renderer/media/webrtc_local_audio_track.cc
index de86a3c4cc36e5d381a4c419cb6dd76409d9bcd2..cae6bfe8ba38bcd85a32f75cf6c6faaa6d1514e5 100644
--- a/content/renderer/media/webrtc_local_audio_track.cc
+++ b/content/renderer/media/webrtc_local_audio_track.cc
@@ -47,7 +47,8 @@ void WebRtcLocalAudioTrack::CaptureData(const int16* audio_data,
int number_of_channels,
int number_of_frames,
int audio_delay_milliseconds,
- int volume) {
+ int volume,
+ bool key_pressed) {
scoped_refptr<WebRtcAudioCapturer> capturer;
std::vector<int> voe_channels;
int sample_rate = 0;
@@ -68,10 +69,15 @@ void WebRtcLocalAudioTrack::CaptureData(const int16* audio_data,
// Feed the data to the sinks.
for (SinkList::const_iterator it = sinks.begin(); it != sinks.end(); ++it) {
- int new_volume = (*it)->CaptureData(voe_channels, audio_data, sample_rate,
- number_of_channels, number_of_frames,
- audio_delay_milliseconds, volume,
- need_audio_processing_);
+ int new_volume = (*it)->CaptureData(voe_channels,
+ audio_data,
+ sample_rate,
+ number_of_channels,
+ number_of_frames,
+ audio_delay_milliseconds,
+ volume,
+ need_audio_processing_,
+ key_pressed);
if (new_volume != 0 && capturer.get())
capturer->SetVolume(new_volume);
}

Powered by Google App Engine
This is Rietveld 408576698