diff options
Diffstat (limited to 'chromium/media/audio/audio_input_device.h')
-rw-r--r-- | chromium/media/audio/audio_input_device.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/chromium/media/audio/audio_input_device.h b/chromium/media/audio/audio_input_device.h index 96a5b4d72d5..219b79301d8 100644 --- a/chromium/media/audio/audio_input_device.h +++ b/chromium/media/audio/audio_input_device.h @@ -68,11 +68,15 @@ class MEDIA_EXPORT AudioInputDevice : public AudioCapturerSource, public AudioInputIPCDelegate { public: enum Purpose : int8_t { kUserInput, kLoopback }; + enum class DeadStreamDetection : bool { kDisabled = false, kEnabled = true }; // NOTE: Clients must call Initialize() before using. // |enable_uma| controls logging of UMA stats. It is used to ensure that // stats are not logged for mirroring service streams. - AudioInputDevice(std::unique_ptr<AudioInputIPC> ipc, Purpose purpose); + // |detect_dead_stream| controls the dead stream detection. + AudioInputDevice(std::unique_ptr<AudioInputIPC> ipc, + Purpose purpose, + DeadStreamDetection detect_dead_stream); // AudioCapturerSource implementation. void Initialize(const AudioParameters& params, @@ -142,6 +146,10 @@ class MEDIA_EXPORT AudioInputDevice : public AudioCapturerSource, // Stores the Automatic Gain Control state. Default is false. bool agc_is_enabled_; + // Controls the dead stream detection. Only the DSP hotword devices set this + // to kDisabled to disable dead stream detection. + const DeadStreamDetection detect_dead_stream_; + // Checks regularly that the input stream is alive and notifies us if it // isn't by calling DetectedDeadInputStream(). Must outlive |audio_callback_|. std::unique_ptr<AliveChecker> alive_checker_; |