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 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
784 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, id_, | 784 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, id_, |
785 "Delay must be in the range of 0-1000 milliseconds."); | 785 "Delay must be in the range of 0-1000 milliseconds."); |
786 return -1; | 786 return -1; |
787 } | 787 } |
788 return receiver_.SetMaximumDelay(time_ms); | 788 return receiver_.SetMaximumDelay(time_ms); |
789 } | 789 } |
790 | 790 |
791 // Get 10 milliseconds of raw audio data to play out. | 791 // Get 10 milliseconds of raw audio data to play out. |
792 // Automatic resample to the requested frequency. | 792 // Automatic resample to the requested frequency. |
793 int AudioCodingModuleImpl::PlayoutData10Ms(int desired_freq_hz, | 793 int AudioCodingModuleImpl::PlayoutData10Ms(int desired_freq_hz, |
794 AudioFrame* audio_frame) { | 794 AudioFrame* audio_frame, |
795 bool* muted) { | |
795 // GetAudio always returns 10 ms, at the requested sample rate. | 796 // GetAudio always returns 10 ms, at the requested sample rate. |
796 if (receiver_.GetAudio(desired_freq_hz, audio_frame) != 0) { | 797 if (receiver_.GetAudio(desired_freq_hz, audio_frame, muted) != 0) { |
797 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, id_, | 798 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, id_, |
798 "PlayoutData failed, RecOut Failed"); | 799 "PlayoutData failed, RecOut Failed"); |
799 return -1; | 800 return -1; |
800 } | 801 } |
801 audio_frame->id_ = id_; | 802 audio_frame->id_ = id_; |
802 return 0; | 803 return 0; |
803 } | 804 } |
804 | 805 |
806 int AudioCodingModuleImpl::PlayoutData10Ms(int desired_freq_hz, | |
807 AudioFrame* audio_frame) { | |
808 bool muted; | |
809 int ret = PlayoutData10Ms(desired_freq_hz, audio_frame, &muted); | |
810 RTC_DCHECK(!muted); | |
minyue-webrtc
2016/05/13 09:43:12
Is it possible to check enable_fast_accelerate of
hlundin-webrtc
2016/05/13 09:45:52
The config is not stored anywhere, so it is not st
| |
811 return ret; | |
812 } | |
813 | |
805 ///////////////////////////////////////// | 814 ///////////////////////////////////////// |
806 // Statistics | 815 // Statistics |
807 // | 816 // |
808 | 817 |
809 // TODO(turajs) change the return value to void. Also change the corresponding | 818 // TODO(turajs) change the return value to void. Also change the corresponding |
810 // NetEq function. | 819 // NetEq function. |
811 int AudioCodingModuleImpl::GetNetworkStatistics(NetworkStatistics* statistics) { | 820 int AudioCodingModuleImpl::GetNetworkStatistics(NetworkStatistics* statistics) { |
812 receiver_.GetNetworkStatistics(statistics); | 821 receiver_.GetNetworkStatistics(statistics); |
813 return 0; | 822 return 0; |
814 } | 823 } |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
938 return receiver_.LeastRequiredDelayMs(); | 947 return receiver_.LeastRequiredDelayMs(); |
939 } | 948 } |
940 | 949 |
941 void AudioCodingModuleImpl::GetDecodingCallStatistics( | 950 void AudioCodingModuleImpl::GetDecodingCallStatistics( |
942 AudioDecodingCallStats* call_stats) const { | 951 AudioDecodingCallStats* call_stats) const { |
943 receiver_.GetDecodingCallStatistics(call_stats); | 952 receiver_.GetDecodingCallStatistics(call_stats); |
944 } | 953 } |
945 | 954 |
946 } // namespace acm2 | 955 } // namespace acm2 |
947 } // namespace webrtc | 956 } // namespace webrtc |
OLD | NEW |