| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 int32_t StopRecording() override { | 209 int32_t StopRecording() override { |
| 210 // Avoid using audio manger (JNI/Java cost) if recording was inactive. | 210 // Avoid using audio manger (JNI/Java cost) if recording was inactive. |
| 211 LOG(INFO) << __FUNCTION__; | 211 LOG(INFO) << __FUNCTION__; |
| 212 if (!Recording()) | 212 if (!Recording()) |
| 213 return 0; | 213 return 0; |
| 214 int32_t err = input_.StopRecording(); | 214 int32_t err = input_.StopRecording(); |
| 215 return err; | 215 return err; |
| 216 } | 216 } |
| 217 | 217 |
| 218 bool Recording() const override { | 218 bool Recording() const override { |
| 219 LOG(LS_VERBOSE) << __FUNCTION__; | |
| 220 return input_.Recording() ; | 219 return input_.Recording() ; |
| 221 } | 220 } |
| 222 | 221 |
| 223 int32_t SetAGC(bool enable) override { | 222 int32_t SetAGC(bool enable) override { |
| 224 if (enable) { | 223 if (enable) { |
| 225 FATAL() << "Should never be called"; | 224 FATAL() << "Should never be called"; |
| 226 } | 225 } |
| 227 return -1; | 226 return -1; |
| 228 } | 227 } |
| 229 | 228 |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 | 413 |
| 415 int32_t PlayoutBuffer( | 414 int32_t PlayoutBuffer( |
| 416 AudioDeviceModule::BufferType& type, uint16_t& sizeMS) const override { | 415 AudioDeviceModule::BufferType& type, uint16_t& sizeMS) const override { |
| 417 FATAL() << "Should never be called"; | 416 FATAL() << "Should never be called"; |
| 418 return -1; | 417 return -1; |
| 419 } | 418 } |
| 420 | 419 |
| 421 int32_t PlayoutDelay(uint16_t& delay_ms) const override { | 420 int32_t PlayoutDelay(uint16_t& delay_ms) const override { |
| 422 // Best guess we can do is to use half of the estimated total delay. | 421 // Best guess we can do is to use half of the estimated total delay. |
| 423 delay_ms = audio_manager_->GetDelayEstimateInMilliseconds() / 2; | 422 delay_ms = audio_manager_->GetDelayEstimateInMilliseconds() / 2; |
| 424 LOG(LS_VERBOSE) << __FUNCTION__ << " delay = " << delay_ms; | |
| 425 RTC_DCHECK_GT(delay_ms, 0); | 423 RTC_DCHECK_GT(delay_ms, 0); |
| 426 return 0; | 424 return 0; |
| 427 } | 425 } |
| 428 | 426 |
| 429 int32_t RecordingDelay(uint16_t& delay_ms) const override { | 427 int32_t RecordingDelay(uint16_t& delay_ms) const override { |
| 430 // Best guess we can do is to use half of the estimated total delay. | 428 // Best guess we can do is to use half of the estimated total delay. |
| 431 LOG(INFO) << __FUNCTION__; | 429 LOG(INFO) << __FUNCTION__; |
| 432 delay_ms = audio_manager_->GetDelayEstimateInMilliseconds() / 2; | 430 delay_ms = audio_manager_->GetDelayEstimateInMilliseconds() / 2; |
| 433 RTC_DCHECK_GT(delay_ms, 0); | 431 RTC_DCHECK_GT(delay_ms, 0); |
| 434 return 0; | 432 return 0; |
| 435 } | 433 } |
| 436 | 434 |
| 437 int32_t CPULoad(uint16_t& load) const override { | 435 int32_t CPULoad(uint16_t& load) const override { |
| 438 FATAL() << "Should never be called"; | 436 FATAL() << "Should never be called"; |
| 439 return -1; | 437 return -1; |
| 440 } | 438 } |
| 441 | 439 |
| 442 bool PlayoutWarning() const override { | 440 bool PlayoutWarning() const override { |
| 443 LOG(LS_VERBOSE) << __FUNCTION__; | |
| 444 return false; | 441 return false; |
| 445 } | 442 } |
| 446 | 443 |
| 447 bool PlayoutError() const override { | 444 bool PlayoutError() const override { |
| 448 LOG(LS_VERBOSE) << __FUNCTION__; | |
| 449 return false; | 445 return false; |
| 450 } | 446 } |
| 451 | 447 |
| 452 bool RecordingWarning() const override { | 448 bool RecordingWarning() const override { |
| 453 LOG(LS_VERBOSE) << __FUNCTION__; | |
| 454 return false; | 449 return false; |
| 455 } | 450 } |
| 456 | 451 |
| 457 bool RecordingError() const override { | 452 bool RecordingError() const override { |
| 458 LOG(LS_VERBOSE) << __FUNCTION__; | |
| 459 return false; | 453 return false; |
| 460 } | 454 } |
| 461 | 455 |
| 462 void ClearPlayoutWarning() override { LOG(INFO) << __FUNCTION__; } | 456 void ClearPlayoutWarning() override { LOG(INFO) << __FUNCTION__; } |
| 463 | 457 |
| 464 void ClearPlayoutError() override { LOG(INFO) << __FUNCTION__; } | 458 void ClearPlayoutError() override { LOG(INFO) << __FUNCTION__; } |
| 465 | 459 |
| 466 void ClearRecordingWarning() override { LOG(INFO) << __FUNCTION__; } | 460 void ClearRecordingWarning() override { LOG(INFO) << __FUNCTION__; } |
| 467 | 461 |
| 468 void ClearRecordingError() override { LOG(INFO) << __FUNCTION__; } | 462 void ClearRecordingError() override { LOG(INFO) << __FUNCTION__; } |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 OutputType output_; | 538 OutputType output_; |
| 545 | 539 |
| 546 InputType input_; | 540 InputType input_; |
| 547 | 541 |
| 548 bool initialized_; | 542 bool initialized_; |
| 549 }; | 543 }; |
| 550 | 544 |
| 551 } // namespace webrtc | 545 } // namespace webrtc |
| 552 | 546 |
| 553 #endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_DEVICE_TEMPLATE_H_ | 547 #endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_DEVICE_TEMPLATE_H_ |
| OLD | NEW |