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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 return 0; | 521 return 0; |
522 } | 522 } |
523 | 523 |
524 // Get current receive frequency. | 524 // Get current receive frequency. |
525 int AudioCodingModuleImpl::ReceiveFrequency() const { | 525 int AudioCodingModuleImpl::ReceiveFrequency() const { |
526 WEBRTC_TRACE(webrtc::kTraceStream, webrtc::kTraceAudioCoding, id_, | 526 WEBRTC_TRACE(webrtc::kTraceStream, webrtc::kTraceAudioCoding, id_, |
527 "ReceiveFrequency()"); | 527 "ReceiveFrequency()"); |
528 | 528 |
529 CriticalSectionScoped lock(acm_crit_sect_.get()); | 529 CriticalSectionScoped lock(acm_crit_sect_.get()); |
530 | 530 |
531 int codec_id = receiver_.last_audio_codec_id(); | 531 auto codec_id = RentACodec::CodecIdFromIndex(receiver_.last_audio_codec_id()); |
532 | 532 return codec_id ? RentACodec::CodecInstById(*codec_id)->plfreq |
533 return codec_id < 0 ? receiver_.current_sample_rate_hz() : | 533 : receiver_.current_sample_rate_hz(); |
534 ACMCodecDB::database_[codec_id].plfreq; | |
535 } | 534 } |
536 | 535 |
537 // Get current playout frequency. | 536 // Get current playout frequency. |
538 int AudioCodingModuleImpl::PlayoutFrequency() const { | 537 int AudioCodingModuleImpl::PlayoutFrequency() const { |
539 WEBRTC_TRACE(webrtc::kTraceStream, webrtc::kTraceAudioCoding, id_, | 538 WEBRTC_TRACE(webrtc::kTraceStream, webrtc::kTraceAudioCoding, id_, |
540 "PlayoutFrequency()"); | 539 "PlayoutFrequency()"); |
541 | 540 |
542 CriticalSectionScoped lock(acm_crit_sect_.get()); | 541 CriticalSectionScoped lock(acm_crit_sect_.get()); |
543 | 542 |
544 return receiver_.current_sample_rate_hz(); | 543 return receiver_.current_sample_rate_hz(); |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 return receiver_.LeastRequiredDelayMs(); | 781 return receiver_.LeastRequiredDelayMs(); |
783 } | 782 } |
784 | 783 |
785 void AudioCodingModuleImpl::GetDecodingCallStatistics( | 784 void AudioCodingModuleImpl::GetDecodingCallStatistics( |
786 AudioDecodingCallStats* call_stats) const { | 785 AudioDecodingCallStats* call_stats) const { |
787 receiver_.GetDecodingCallStatistics(call_stats); | 786 receiver_.GetDecodingCallStatistics(call_stats); |
788 } | 787 } |
789 | 788 |
790 } // namespace acm2 | 789 } // namespace acm2 |
791 } // namespace webrtc | 790 } // namespace webrtc |
OLD | NEW |