OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include <algorithm> | 11 #include <algorithm> |
12 #include <cmath> | 12 #include <cmath> |
13 | 13 |
14 #include "webrtc/modules/audio_device/audio_device_buffer.h" | 14 #include "webrtc/modules/audio_device/audio_device_buffer.h" |
15 | 15 |
| 16 #include "webrtc/base/arraysize.h" |
| 17 #include "webrtc/base/bind.h" |
| 18 #include "webrtc/base/checks.h" |
| 19 #include "webrtc/base/logging.h" |
| 20 #include "webrtc/base/format_macros.h" |
| 21 #include "webrtc/base/timeutils.h" |
16 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" | 22 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" |
17 #include "webrtc/modules/audio_device/audio_device_config.h" | 23 #include "webrtc/modules/audio_device/audio_device_config.h" |
18 #include "webrtc/rtc_base/arraysize.h" | |
19 #include "webrtc/rtc_base/bind.h" | |
20 #include "webrtc/rtc_base/checks.h" | |
21 #include "webrtc/rtc_base/format_macros.h" | |
22 #include "webrtc/rtc_base/logging.h" | |
23 #include "webrtc/rtc_base/timeutils.h" | |
24 #include "webrtc/system_wrappers/include/metrics.h" | 24 #include "webrtc/system_wrappers/include/metrics.h" |
25 | 25 |
26 namespace webrtc { | 26 namespace webrtc { |
27 | 27 |
28 static const char kTimerQueueName[] = "AudioDeviceBufferTimer"; | 28 static const char kTimerQueueName[] = "AudioDeviceBufferTimer"; |
29 | 29 |
30 // Time between two sucessive calls to LogStats(). | 30 // Time between two sucessive calls to LogStats(). |
31 static const size_t kTimerIntervalInSeconds = 10; | 31 static const size_t kTimerIntervalInSeconds = 10; |
32 static const size_t kTimerIntervalInMilliseconds = | 32 static const size_t kTimerIntervalInMilliseconds = |
33 kTimerIntervalInSeconds * rtc::kNumMillisecsPerSec; | 33 kTimerIntervalInSeconds * rtc::kNumMillisecsPerSec; |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 RTC_DCHECK_RUN_ON(&playout_thread_checker_); | 521 RTC_DCHECK_RUN_ON(&playout_thread_checker_); |
522 rtc::CritScope cs(&lock_); | 522 rtc::CritScope cs(&lock_); |
523 ++stats_.play_callbacks; | 523 ++stats_.play_callbacks; |
524 stats_.play_samples += samples_per_channel; | 524 stats_.play_samples += samples_per_channel; |
525 if (max_abs > stats_.max_play_level) { | 525 if (max_abs > stats_.max_play_level) { |
526 stats_.max_play_level = max_abs; | 526 stats_.max_play_level = max_abs; |
527 } | 527 } |
528 } | 528 } |
529 | 529 |
530 } // namespace webrtc | 530 } // namespace webrtc |
OLD | NEW |