| Index: media/audio/audio_input_controller.h
|
| diff --git a/media/audio/audio_input_controller.h b/media/audio/audio_input_controller.h
|
| index 3facfb511d18670a4a6d2ce0e0f19071099fe0e8..5b29ac8acf05daf17f78e7030fd205d4837bd643 100644
|
| --- a/media/audio/audio_input_controller.h
|
| +++ b/media/audio/audio_input_controller.h
|
| @@ -16,6 +16,9 @@
|
| #include "base/timer/timer.h"
|
| #include "media/audio/audio_io.h"
|
| #include "media/audio/audio_manager_base.h"
|
| +#include "media/audio/audio_parameters.h"
|
| +#include "media/audio/audio_power_monitor.h"
|
| +#include "media/base/audio_bus.h"
|
|
|
| // An AudioInputController controls an AudioInputStream and records data
|
| // from this input stream. The two main methods are Record() and Close() and
|
| @@ -72,6 +75,11 @@
|
| //
|
| namespace media {
|
|
|
| +// Only do power monitoring for non-mobile platforms to save resources.
|
| +#if !defined(OS_ANDROID) && !defined(OS_IOS)
|
| +#define AUDIO_POWER_MONITORING
|
| +#endif
|
| +
|
| class UserInputMonitor;
|
|
|
| class MEDIA_EXPORT AudioInputController
|
| @@ -309,6 +317,16 @@ class MEDIA_EXPORT AudioInputController
|
|
|
| UserInputMonitor* user_input_monitor_;
|
|
|
| +#if defined(AUDIO_POWER_MONITORING)
|
| + // Scans audio samples from OnData() as input to compute audio levels.
|
| + scoped_ptr<AudioPowerMonitor> audio_level_;
|
| +
|
| + // We need these to be able to feed data to the AudioPowerMonitor.
|
| + scoped_ptr<AudioBus> audio_bus_;
|
| + media::AudioParameters audio_params_;
|
| + base::TimeTicks last_audio_level_log_time_;
|
| +#endif
|
| +
|
| size_t prev_key_down_count_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(AudioInputController);
|
|
|