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

Unified Diff: content/renderer/media/audio_input_device.h

Issue 9702019: Adds Analog Gain Control (AGC) to the WebRTC client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/media/audio_messages.h ('k') | content/renderer/media/audio_input_device.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/audio_input_device.h
diff --git a/content/renderer/media/audio_input_device.h b/content/renderer/media/audio_input_device.h
index a91ee16548212ea8ed3994b64417c5856cf7f9ed..99cd03c47a7717953e042853b883296b2059c7b9 100644
--- a/content/renderer/media/audio_input_device.h
+++ b/content/renderer/media/audio_input_device.h
@@ -69,6 +69,7 @@
#define CONTENT_RENDERER_MEDIA_AUDIO_INPUT_DEVICE_H_
#pragma once
+#include <string>
#include <vector>
#include "base/basictypes.h"
@@ -95,7 +96,8 @@ class CONTENT_EXPORT AudioInputDevice
public:
virtual void Capture(const std::vector<float*>& audio_data,
size_t number_of_frames,
- size_t audio_delay_milliseconds) = 0;
+ size_t audio_delay_milliseconds,
+ double volume) = 0;
virtual void OnCaptureError() = 0;
protected:
virtual ~CaptureCallback() {}
@@ -149,8 +151,13 @@ class CONTENT_EXPORT AudioInputDevice
return audio_parameters_.frames_per_buffer();
}
+ // Sets the Automatic Gain Control state to on or off.
+ // This method must be called before Start(). It will not have any effect
+ // if it is called while capturing has already started.
+ void SetAutomaticGainControl(bool enabled);
+
// Methods called on IO thread ----------------------------------------------
- // AudioInputMessageFilter::Delegate impl., called by AudioInputMessageFilter
+ // AudioInputMessageFilter::Delegate impl., called by AudioInputMessageFilter.
virtual void OnStreamCreated(base::SharedMemoryHandle handle,
base::SyncSocket::Handle socket_handle,
uint32 length) OVERRIDE;
@@ -168,6 +175,7 @@ class CONTENT_EXPORT AudioInputDevice
void StartOnIOThread();
void ShutDownOnIOThread();
void SetVolumeOnIOThread(double volume);
+ void SetAutomaticGainControlOnIOThread(bool enabled);
void Send(IPC::Message* message);
@@ -198,6 +206,10 @@ class CONTENT_EXPORT AudioInputDevice
// callback. Only modified on the IO thread.
bool pending_device_ready_;
+ // Stores the Automatic Gain Control state. Default is false.
+ // Only modified on the IO thread.
+ bool agc_is_enabled_;
+
// Our audio thread callback class. See source file for details.
class AudioThreadCallback;
« no previous file with comments | « content/common/media/audio_messages.h ('k') | content/renderer/media/audio_input_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698