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/scoped_ref_ptr.h" | 16 #include "webrtc/base/scoped_ref_ptr.h" |
17 #include "webrtc/common_audio/resampler/include/push_resampler.h" | 17 #include "webrtc/common_audio/resampler/include/push_resampler.h" |
18 #include "webrtc/modules/audio_device/include/audio_device_defines.h" | 18 #include "webrtc/modules/audio_device/include/audio_device_defines.h" |
19 #include "webrtc/modules/audio_processing/include/audio_processing.h" | 19 #include "webrtc/modules/audio_processing/include/audio_processing.h" |
20 | 20 |
21 namespace webrtc { | 21 namespace webrtc { |
22 | 22 |
23 class AudioTransportProxy : public AudioTransport { | 23 class AudioTransportProxy : public AudioTransport { |
24 public: | 24 public: |
25 AudioTransportProxy(AudioTransport* voe_audio_transport, | 25 AudioTransportProxy(AudioTransport* voe_audio_transport, |
26 AudioProcessing* apm, | 26 AudioProcessing* audio_processing, |
27 AudioMixer* mixer); | 27 AudioMixer* mixer); |
28 | 28 |
29 ~AudioTransportProxy() override; | 29 ~AudioTransportProxy() override; |
30 | 30 |
31 int32_t RecordedDataIsAvailable(const void* audioSamples, | 31 int32_t RecordedDataIsAvailable(const void* audioSamples, |
32 const size_t nSamples, | 32 const size_t nSamples, |
33 const size_t nBytesPerSample, | 33 const size_t nBytesPerSample, |
34 const size_t nChannels, | 34 const size_t nChannels, |
35 const uint32_t samplesPerSec, | 35 const uint32_t samplesPerSec, |
36 const uint32_t totalDelayMS, | 36 const uint32_t totalDelayMS, |
(...skipping 21 matching lines...) Expand all Loading... |
58 void PullRenderData(int bits_per_sample, | 58 void PullRenderData(int bits_per_sample, |
59 int sample_rate, | 59 int sample_rate, |
60 size_t number_of_channels, | 60 size_t number_of_channels, |
61 size_t number_of_frames, | 61 size_t number_of_frames, |
62 void* audio_data, | 62 void* audio_data, |
63 int64_t* elapsed_time_ms, | 63 int64_t* elapsed_time_ms, |
64 int64_t* ntp_time_ms) override; | 64 int64_t* ntp_time_ms) override; |
65 | 65 |
66 private: | 66 private: |
67 AudioTransport* voe_audio_transport_; | 67 AudioTransport* voe_audio_transport_; |
68 AudioProcessing* apm_; | 68 AudioProcessing* audio_processing_; |
69 rtc::scoped_refptr<AudioMixer> mixer_; | 69 rtc::scoped_refptr<AudioMixer> mixer_; |
70 AudioFrame mixed_frame_; | 70 AudioFrame mixed_frame_; |
71 // Converts mixed audio to the audio device output rate. | 71 // Converts mixed audio to the audio device output rate. |
72 PushResampler<int16_t> resampler_; | 72 PushResampler<int16_t> resampler_; |
73 | 73 |
74 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioTransportProxy); | 74 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioTransportProxy); |
75 }; | 75 }; |
76 } // namespace webrtc | 76 } // namespace webrtc |
77 | 77 |
78 #endif // WEBRTC_AUDIO_AUDIO_TRANSPORT_PROXY_H_ | 78 #endif // WEBRTC_AUDIO_AUDIO_TRANSPORT_PROXY_H_ |
OLD | NEW |