| 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;
|
|
|
|
|