OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 int32_t AudioTransportProxy::RecordedDataIsAvailable( | 45 int32_t AudioTransportProxy::RecordedDataIsAvailable( |
46 const void* audioSamples, | 46 const void* audioSamples, |
47 const size_t nSamples, | 47 const size_t nSamples, |
48 const size_t nBytesPerSample, | 48 const size_t nBytesPerSample, |
49 const size_t nChannels, | 49 const size_t nChannels, |
50 const uint32_t samplesPerSec, | 50 const uint32_t samplesPerSec, |
51 const uint32_t totalDelayMS, | 51 const uint32_t totalDelayMS, |
52 const int32_t clockDrift, | 52 const int32_t clockDrift, |
53 const uint32_t currentMicLevel, | 53 const uint32_t currentMicLevel, |
54 const bool keyPressed, | 54 const bool keyPressed, |
55 uint32_t& newMicLevel) { | 55 uint32_t& newMicLevel) { // NOLINT: to avoid changing APIs |
56 // Pass call through to original audio transport instance. | 56 // Pass call through to original audio transport instance. |
57 return voe_audio_transport_->RecordedDataIsAvailable( | 57 return voe_audio_transport_->RecordedDataIsAvailable( |
58 audioSamples, nSamples, nBytesPerSample, nChannels, samplesPerSec, | 58 audioSamples, nSamples, nBytesPerSample, nChannels, samplesPerSec, |
59 totalDelayMS, clockDrift, currentMicLevel, keyPressed, newMicLevel); | 59 totalDelayMS, clockDrift, currentMicLevel, keyPressed, newMicLevel); |
60 } | 60 } |
61 | 61 |
62 int32_t AudioTransportProxy::NeedMorePlayData(const size_t nSamples, | 62 int32_t AudioTransportProxy::NeedMorePlayData(const size_t nSamples, |
63 const size_t nBytesPerSample, | 63 const size_t nBytesPerSample, |
64 const size_t nChannels, | 64 const size_t nChannels, |
65 const uint32_t samplesPerSec, | 65 const uint32_t samplesPerSec, |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 mixer_->Mix(number_of_channels, &mixed_frame_); | 124 mixer_->Mix(number_of_channels, &mixed_frame_); |
125 *elapsed_time_ms = mixed_frame_.elapsed_time_ms_; | 125 *elapsed_time_ms = mixed_frame_.elapsed_time_ms_; |
126 *ntp_time_ms = mixed_frame_.ntp_time_ms_; | 126 *ntp_time_ms = mixed_frame_.ntp_time_ms_; |
127 | 127 |
128 const auto output_samples = Resample(mixed_frame_, sample_rate, &resampler_, | 128 const auto output_samples = Resample(mixed_frame_, sample_rate, &resampler_, |
129 static_cast<int16_t*>(audio_data)); | 129 static_cast<int16_t*>(audio_data)); |
130 RTC_DCHECK_EQ(output_samples, number_of_channels * number_of_frames); | 130 RTC_DCHECK_EQ(output_samples, number_of_channels * number_of_frames); |
131 } | 131 } |
132 | 132 |
133 } // namespace webrtc | 133 } // namespace webrtc |
OLD | NEW |