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

Side by Side Diff: content/renderer/media/webrtc_audio_device_impl.h

Issue 15563004: Improved AGC update scheme for the audio backend in Chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added Start/Stop APIs for the AGC part Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | media/audio/agc_audio_stream.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // AudioInputController::DoSetAutomaticGainControl(true) 115 // AudioInputController::DoSetAutomaticGainControl(true)
116 // AudioInputStream::SetAutomaticGainControl(true) 116 // AudioInputStream::SetAutomaticGainControl(true)
117 // | 117 // |
118 // AGC is now enabled in the media layer and streaming starts (details omitted). 118 // AGC is now enabled in the media layer and streaming starts (details omitted).
119 // The figure below illustrates the AGC scheme which is active in combination 119 // The figure below illustrates the AGC scheme which is active in combination
120 // with the default media flow explained earlier. 120 // with the default media flow explained earlier.
121 // | 121 // |
122 // [browser] 122 // [browser]
123 // | 123 // |
124 // AudioInputStream::(Capture thread loop) 124 // AudioInputStream::(Capture thread loop)
125 // AudioInputStreamImpl::QueryAgcVolume() => new volume once per second 125 // AgcAudioStream<AudioInputStream>::GetAgcVolume() => get latest mic volume
126 // AudioInputData::OnData(..., volume) 126 // AudioInputData::OnData(..., volume)
127 // AudioInputController::OnData(..., volume) 127 // AudioInputController::OnData(..., volume)
128 // AudioInputSyncWriter::Write(..., volume) 128 // AudioInputSyncWriter::Write(..., volume)
129 // | 129 // |
130 // [volume | size | data] is sent to the renderer [shared memory] 130 // [volume | size | data] is sent to the renderer [shared memory]
131 // | 131 // |
132 // [renderer] 132 // [renderer]
133 // | 133 // |
134 // AudioInputDevice::AudioThreadCallback::Process() 134 // AudioInputDevice::AudioThreadCallback::Process()
135 // WebRtcAudioDeviceImpl::Capture(..., volume) 135 // WebRtcAudioDeviceImpl::Capture(..., volume)
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 // Stores latest microphone volume received in a CaptureData() callback. 382 // Stores latest microphone volume received in a CaptureData() callback.
383 // Range is [0, 255]. 383 // Range is [0, 255].
384 uint32_t microphone_volume_; 384 uint32_t microphone_volume_;
385 385
386 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceImpl); 386 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceImpl);
387 }; 387 };
388 388
389 } // namespace content 389 } // namespace content
390 390
391 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ 391 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | media/audio/agc_audio_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698