| 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 | 273 |
| 274 void AudioDeviceBuffer::SetVQEData(int play_delay_ms, | 274 void AudioDeviceBuffer::SetVQEData(int play_delay_ms, |
| 275 int rec_delay_ms, | 275 int rec_delay_ms, |
| 276 int clock_drift) { | 276 int clock_drift) { |
| 277 RTC_DCHECK_RUN_ON(&recording_thread_checker_); | 277 RTC_DCHECK_RUN_ON(&recording_thread_checker_); |
| 278 play_delay_ms_ = play_delay_ms; | 278 play_delay_ms_ = play_delay_ms; |
| 279 rec_delay_ms_ = rec_delay_ms; | 279 rec_delay_ms_ = rec_delay_ms; |
| 280 clock_drift_ = clock_drift; | 280 clock_drift_ = clock_drift; |
| 281 } | 281 } |
| 282 | 282 |
| 283 int32_t AudioDeviceBuffer::StartInputFileRecording( | |
| 284 const char fileName[kAdmMaxFileNameSize]) { | |
| 285 LOG(LS_WARNING) << "Not implemented"; | |
| 286 return 0; | |
| 287 } | |
| 288 | |
| 289 int32_t AudioDeviceBuffer::StopInputFileRecording() { | |
| 290 LOG(LS_WARNING) << "Not implemented"; | |
| 291 return 0; | |
| 292 } | |
| 293 | |
| 294 int32_t AudioDeviceBuffer::StartOutputFileRecording( | |
| 295 const char fileName[kAdmMaxFileNameSize]) { | |
| 296 LOG(LS_WARNING) << "Not implemented"; | |
| 297 return 0; | |
| 298 } | |
| 299 | |
| 300 int32_t AudioDeviceBuffer::StopOutputFileRecording() { | |
| 301 LOG(LS_WARNING) << "Not implemented"; | |
| 302 return 0; | |
| 303 } | |
| 304 | |
| 305 int32_t AudioDeviceBuffer::SetRecordedBuffer(const void* audio_buffer, | 283 int32_t AudioDeviceBuffer::SetRecordedBuffer(const void* audio_buffer, |
| 306 size_t samples_per_channel) { | 284 size_t samples_per_channel) { |
| 307 RTC_DCHECK_RUN_ON(&recording_thread_checker_); | 285 RTC_DCHECK_RUN_ON(&recording_thread_checker_); |
| 308 // Copy the complete input buffer to the local buffer. | 286 // Copy the complete input buffer to the local buffer. |
| 309 const size_t old_size = rec_buffer_.size(); | 287 const size_t old_size = rec_buffer_.size(); |
| 310 rec_buffer_.SetData(static_cast<const int16_t*>(audio_buffer), | 288 rec_buffer_.SetData(static_cast<const int16_t*>(audio_buffer), |
| 311 rec_channels_ * samples_per_channel); | 289 rec_channels_ * samples_per_channel); |
| 312 // Keep track of the size of the recording buffer. Only updated when the | 290 // Keep track of the size of the recording buffer. Only updated when the |
| 313 // size changes, which is a rare event. | 291 // size changes, which is a rare event. |
| 314 if (old_size != rec_buffer_.size()) { | 292 if (old_size != rec_buffer_.size()) { |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 RTC_DCHECK_RUN_ON(&playout_thread_checker_); | 505 RTC_DCHECK_RUN_ON(&playout_thread_checker_); |
| 528 rtc::CritScope cs(&lock_); | 506 rtc::CritScope cs(&lock_); |
| 529 ++stats_.play_callbacks; | 507 ++stats_.play_callbacks; |
| 530 stats_.play_samples += samples_per_channel; | 508 stats_.play_samples += samples_per_channel; |
| 531 if (max_abs > stats_.max_play_level) { | 509 if (max_abs > stats_.max_play_level) { |
| 532 stats_.max_play_level = max_abs; | 510 stats_.max_play_level = max_abs; |
| 533 } | 511 } |
| 534 } | 512 } |
| 535 | 513 |
| 536 } // namespace webrtc | 514 } // namespace webrtc |
| OLD | NEW |