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

Unified Diff: media/audio/audio_input_controller.h

Issue 663123002: Reduce power logging and UMA stats when AGC is disabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years, 2 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
Index: media/audio/audio_input_controller.h
diff --git a/media/audio/audio_input_controller.h b/media/audio/audio_input_controller.h
index 4bacaa54c5fc276ca4adf3131ac0efe3c303a91d..19d04ecf5e8ae9a343607e3e3e933011c17ad51e 100644
--- a/media/audio/audio_input_controller.h
+++ b/media/audio/audio_input_controller.h
@@ -188,7 +188,8 @@ class MEDIA_EXPORT AudioInputController
const std::string& device_id,
// External synchronous writer for audio controller.
SyncWriter* sync_writer,
- UserInputMonitor* user_input_monitor);
+ UserInputMonitor* user_input_monitor,
+ const bool agc_is_enabled);
// Factory method for creating an AudioInputController with an existing
// |stream| for low-latency mode, taking ownership of |stream|. The stream
@@ -221,10 +222,6 @@ class MEDIA_EXPORT AudioInputController
// to muted and 1.0 to maximum volume.
virtual void SetVolume(double volume);
- // Sets the Automatic Gain Control (AGC) state of the input stream.
- // Changing the AGC state is not supported while recording is active.
- virtual void SetAutomaticGainControl(bool enabled);
-
// AudioInputCallback implementation. Threading details depends on the
// device-specific implementation.
void OnData(AudioInputStream* stream,
@@ -267,8 +264,9 @@ class MEDIA_EXPORT AudioInputController
AudioInputController(EventHandler* handler,
SyncWriter* sync_writer,
- UserInputMonitor* user_input_monitor);
- ~AudioInputController() override;
+ UserInputMonitor* user_input_monitor,
+ const bool agc_is_enabled);
+ virtual ~AudioInputController();
// Methods called on the audio thread (owned by the AudioManager).
void DoCreate(AudioManager* audio_manager,
@@ -282,7 +280,6 @@ class MEDIA_EXPORT AudioInputController
void DoClose();
void DoReportError();
void DoSetVolume(double volume);
- void DoSetAutomaticGainControl(bool enabled);
void DoOnData(scoped_ptr<AudioBus> data);
void DoLogAudioLevels(float level_dbfs, int microphone_volume_percent);
@@ -351,6 +348,8 @@ class MEDIA_EXPORT AudioInputController
UserInputMonitor* user_input_monitor_;
+ const bool agc_is_enabled_;
+
#if defined(AUDIO_POWER_MONITORING)
// Enabled in DoCrete() but not in DoCreateForStream().
bool power_measurement_is_enabled_;
« no previous file with comments | « content/browser/renderer_host/media/audio_input_renderer_host.cc ('k') | media/audio/audio_input_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698