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

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

Issue 9702019: Adds Analog Gain Control (AGC) to the WebRTC client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added audio_input_stream_impl.h/.cc Created 8 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 // AudioDevice::RenderCallback implementation. 114 // AudioDevice::RenderCallback implementation.
115 virtual size_t Render(const std::vector<float*>& audio_data, 115 virtual size_t Render(const std::vector<float*>& audio_data,
116 size_t number_of_frames, 116 size_t number_of_frames,
117 size_t audio_delay_milliseconds) OVERRIDE; 117 size_t audio_delay_milliseconds) OVERRIDE;
118 virtual void OnRenderError() OVERRIDE; 118 virtual void OnRenderError() OVERRIDE;
119 119
120 // AudioInputDevice::CaptureCallback implementation. 120 // AudioInputDevice::CaptureCallback implementation.
121 virtual void Capture(const std::vector<float*>& audio_data, 121 virtual void Capture(const std::vector<float*>& audio_data,
122 size_t number_of_frames, 122 size_t number_of_frames,
123 size_t audio_delay_milliseconds) OVERRIDE; 123 size_t audio_delay_milliseconds,
124 double volume) OVERRIDE;
124 virtual void OnCaptureError() OVERRIDE; 125 virtual void OnCaptureError() OVERRIDE;
125 126
126 // AudioInputDevice::CaptureEventHandler implementation. 127 // AudioInputDevice::CaptureEventHandler implementation.
127 virtual void OnDeviceStarted(const std::string& device_id) OVERRIDE; 128 virtual void OnDeviceStarted(const std::string& device_id) OVERRIDE;
128 virtual void OnDeviceStopped() OVERRIDE; 129 virtual void OnDeviceStopped() OVERRIDE;
129 130
130 // webrtc::Module implementation. 131 // webrtc::Module implementation.
131 virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE; 132 virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE;
132 virtual int32_t TimeUntilNextProcess() OVERRIDE; 133 virtual int32_t TimeUntilNextProcess() OVERRIDE;
133 virtual int32_t Process() OVERRIDE; 134 virtual int32_t Process() OVERRIDE;
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 324
324 // Protects |recording_|, |output_delay_ms_|, |input_delay_ms_|. 325 // Protects |recording_|, |output_delay_ms_|, |input_delay_ms_|.
325 mutable base::Lock lock_; 326 mutable base::Lock lock_;
326 327
327 int bytes_per_sample_; 328 int bytes_per_sample_;
328 329
329 bool initialized_; 330 bool initialized_;
330 bool playing_; 331 bool playing_;
331 bool recording_; 332 bool recording_;
332 333
334 // Local copy of the current Automatic Gain Control state.
335 bool agc_is_enabled_;
336
333 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceImpl); 337 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceImpl);
334 }; 338 };
335 339
336 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ 340 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698