Chromium Code Reviews| 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 |
| 11 #ifndef WEBRTC_AUDIO_AUDIO_TRANSPORT_PROXY_H_ | 11 #ifndef WEBRTC_AUDIO_AUDIO_TRANSPORT_PROXY_H_ |
| 12 #define WEBRTC_AUDIO_AUDIO_TRANSPORT_PROXY_H_ | 12 #define WEBRTC_AUDIO_AUDIO_TRANSPORT_PROXY_H_ |
| 13 | 13 |
| 14 #include "webrtc/api/audio/audio_mixer.h" | 14 #include "webrtc/api/audio/audio_mixer.h" |
| 15 #include "webrtc/base/constructormagic.h" | 15 #include "webrtc/base/constructormagic.h" |
| 16 #include "webrtc/base/logging.h" | |
|
the sun
2016/11/14 20:03:47
Logging is not required here.
aleloi
2016/11/15 16:56:54
Removed.
| |
| 17 #include "webrtc/common_audio/resampler/include/push_resampler.h" | |
| 16 #include "webrtc/modules/audio_device/include/audio_device_defines.h" | 18 #include "webrtc/modules/audio_device/include/audio_device_defines.h" |
| 17 #include "webrtc/modules/audio_processing/include/audio_processing.h" | 19 #include "webrtc/modules/audio_processing/include/audio_processing.h" |
| 18 | 20 |
| 19 namespace webrtc { | 21 namespace webrtc { |
| 20 | 22 |
| 21 class AudioTransportProxy : public AudioTransport { | 23 class AudioTransportProxy : public AudioTransport { |
| 22 public: | 24 public: |
| 23 AudioTransportProxy(AudioTransport* voe_audio_transport, | 25 AudioTransportProxy(AudioTransport* voe_audio_transport, |
| 24 AudioProcessing* apm, | 26 AudioProcessing* apm, |
| 25 AudioMixer* mixer); | 27 AudioMixer* mixer); |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 56 void PullRenderData(int bits_per_sample, | 58 void PullRenderData(int bits_per_sample, |
| 57 int sample_rate, | 59 int sample_rate, |
| 58 size_t number_of_channels, | 60 size_t number_of_channels, |
| 59 size_t number_of_frames, | 61 size_t number_of_frames, |
| 60 void* audio_data, | 62 void* audio_data, |
| 61 int64_t* elapsed_time_ms, | 63 int64_t* elapsed_time_ms, |
| 62 int64_t* ntp_time_ms) override; | 64 int64_t* ntp_time_ms) override; |
| 63 | 65 |
| 64 private: | 66 private: |
| 65 AudioTransport* voe_audio_transport_; | 67 AudioTransport* voe_audio_transport_; |
| 68 AudioProcessing* apm_; | |
| 69 AudioMixer* mixer_; | |
|
the sun
2016/11/14 20:03:47
This should be a scoped_refptr
aleloi
2016/11/15 16:56:54
Done.
| |
| 66 AudioFrame frame_for_mixing_; | 70 AudioFrame frame_for_mixing_; |
|
the sun
2016/11/14 20:03:47
nit: how about "mixed_frame_"?
aleloi
2016/11/15 16:56:54
Done.
| |
| 71 // Converts mixed audio to the audio device output rate. | |
| 72 PushResampler<int16_t> resampler_; | |
| 67 | 73 |
| 68 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioTransportProxy); | 74 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioTransportProxy); |
| 69 }; | 75 }; |
| 70 } // namespace webrtc | 76 } // namespace webrtc |
| 71 | 77 |
| 72 #endif // WEBRTC_AUDIO_AUDIO_TRANSPORT_PROXY_H_ | 78 #endif // WEBRTC_AUDIO_AUDIO_TRANSPORT_PROXY_H_ |
| OLD | NEW |