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 ed855548fbaa3dea40fad0eceda59c633ea51f89..13b89b122228b1d26fe64e98283e7888656e72ed 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() {} |
@@ -144,11 +146,16 @@ class CONTENT_EXPORT AudioInputDevice |
// Returns |true| on success. |
bool GetVolume(double* volume); |
+ // 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); |
+ |
double sample_rate() const { return audio_parameters_.sample_rate; } |
size_t buffer_size() const { return audio_parameters_.samples_per_packet; } |
// 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; |
@@ -166,6 +173,7 @@ class CONTENT_EXPORT AudioInputDevice |
void StartOnIOThread(); |
void ShutDownOnIOThread(); |
void SetVolumeOnIOThread(double volume); |
+ void SetAutomaticGainControlOnIOThread(bool enabled); |
void Send(IPC::Message* message); |
@@ -196,6 +204,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; |