OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ |
6 #define MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ | 6 #define MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include "base/atomicops.h" | 9 #include "base/atomicops.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 | 320 |
321 UserInputMonitor* user_input_monitor_; | 321 UserInputMonitor* user_input_monitor_; |
322 | 322 |
323 #if defined(AUDIO_POWER_MONITORING) | 323 #if defined(AUDIO_POWER_MONITORING) |
324 // Scans audio samples from OnData() as input to compute audio levels. | 324 // Scans audio samples from OnData() as input to compute audio levels. |
325 scoped_ptr<AudioPowerMonitor> audio_level_; | 325 scoped_ptr<AudioPowerMonitor> audio_level_; |
326 | 326 |
327 // We need these to be able to feed data to the AudioPowerMonitor. | 327 // We need these to be able to feed data to the AudioPowerMonitor. |
328 media::AudioParameters audio_params_; | 328 media::AudioParameters audio_params_; |
329 base::TimeTicks last_audio_level_log_time_; | 329 base::TimeTicks last_audio_level_log_time_; |
| 330 |
| 331 bool last_audio_level_was_silence_; |
| 332 int silence_counter_; |
330 #endif | 333 #endif |
331 | 334 |
332 size_t prev_key_down_count_; | 335 size_t prev_key_down_count_; |
333 | 336 |
334 DISALLOW_COPY_AND_ASSIGN(AudioInputController); | 337 DISALLOW_COPY_AND_ASSIGN(AudioInputController); |
335 }; | 338 }; |
336 | 339 |
337 } // namespace media | 340 } // namespace media |
338 | 341 |
339 #endif // MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ | 342 #endif // MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ |
OLD | NEW |