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 |
(...skipping 93 matching lines...) Loading... |
104 } | 104 } |
105 LOG(INFO) << __FUNCTION__; | 105 LOG(INFO) << __FUNCTION__; |
106 playout_thread_checker_.DetachFromThread(); | 106 playout_thread_checker_.DetachFromThread(); |
107 // Clear members tracking playout stats and do it on the task queue. | 107 // Clear members tracking playout stats and do it on the task queue. |
108 task_queue_.PostTask([this] { ResetPlayStats(); }); | 108 task_queue_.PostTask([this] { ResetPlayStats(); }); |
109 // Start a periodic timer based on task queue if not already done by the | 109 // Start a periodic timer based on task queue if not already done by the |
110 // recording side. | 110 // recording side. |
111 if (!recording_) { | 111 if (!recording_) { |
112 StartPeriodicLogging(); | 112 StartPeriodicLogging(); |
113 } | 113 } |
114 const uint64_t now_time = rtc::TimeMillis(); | 114 const int64_t now_time = rtc::TimeMillis(); |
115 // Clear members that are only touched on the main (creating) thread. | 115 // Clear members that are only touched on the main (creating) thread. |
116 play_start_time_ = now_time; | 116 play_start_time_ = now_time; |
117 playing_ = true; | 117 playing_ = true; |
118 } | 118 } |
119 | 119 |
120 void AudioDeviceBuffer::StartRecording() { | 120 void AudioDeviceBuffer::StartRecording() { |
121 RTC_DCHECK_RUN_ON(&main_thread_checker_); | 121 RTC_DCHECK_RUN_ON(&main_thread_checker_); |
122 if (recording_) { | 122 if (recording_) { |
123 return; | 123 return; |
124 } | 124 } |
(...skipping 400 matching lines...) Loading... |
525 size_t samples_per_channel) { | 525 size_t samples_per_channel) { |
526 RTC_DCHECK_RUN_ON(&task_queue_); | 526 RTC_DCHECK_RUN_ON(&task_queue_); |
527 ++play_callbacks_; | 527 ++play_callbacks_; |
528 play_samples_ += samples_per_channel; | 528 play_samples_ += samples_per_channel; |
529 if (max_abs > max_play_level_) { | 529 if (max_abs > max_play_level_) { |
530 max_play_level_ = max_abs; | 530 max_play_level_ = max_abs; |
531 } | 531 } |
532 } | 532 } |
533 | 533 |
534 } // namespace webrtc | 534 } // namespace webrtc |
OLD | NEW |