| Index: media/audio/mac/audio_low_latency_input_mac.h
|
| diff --git a/media/audio/mac/audio_low_latency_input_mac.h b/media/audio/mac/audio_low_latency_input_mac.h
|
| index 52609d615c0fb4ea83311eea9195d886e7238110..794e6310d449c63d98cea7c8827d1773472aa42a 100644
|
| --- a/media/audio/mac/audio_low_latency_input_mac.h
|
| +++ b/media/audio/mac/audio_low_latency_input_mac.h
|
| @@ -38,8 +38,10 @@
|
|
|
| #include <AudioUnit/AudioUnit.h>
|
|
|
| +#include "base/atomicops.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/synchronization/lock.h"
|
| +#include "base/time.h"
|
| #include "media/audio/audio_io.h"
|
| #include "media/audio/audio_parameters.h"
|
|
|
| @@ -64,6 +66,8 @@ class AUAudioInputStream : public AudioInputStream {
|
| virtual double GetMaxVolume() OVERRIDE;
|
| virtual void SetVolume(double volume) OVERRIDE;
|
| virtual double GetVolume() OVERRIDE;
|
| + virtual void SetAutomaticGainControl(bool enabled) OVERRIDE;
|
| + virtual bool GetAutomaticGainControl() OVERRIDE;
|
|
|
| // Returns the current hardware sample rate for the default input device.
|
| MEDIA_EXPORT static double HardwareSampleRate();
|
| @@ -140,6 +144,19 @@ class AUAudioInputStream : public AudioInputStream {
|
| // when querying the volume of each channel.
|
| int number_of_channels_in_frame_;
|
|
|
| + // Keeps track of last time a new volume level was fed to the client in an
|
| + // OnData() callback.
|
| + base::Time last_volume_update_time_;
|
| +
|
| + // Contains last result of internal call to GetVolume(). We save resources
|
| + // by not quering the capture volume for each callback.
|
| + double volume_;
|
| +
|
| + // True when Automatic Gain Control is enabled, false otherwise.
|
| + // This member is modified on the audio thread and read on the internal
|
| + // Audio Unit thread in each capture callback.
|
| + base::subtle::Atomic32 agc_is_enabled_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(AUAudioInputStream);
|
| };
|
|
|
|
|