Chromium Code Reviews| Index: webrtc/modules/audio_mixer/source/new_audio_conference_mixer_impl.cc |
| diff --git a/webrtc/modules/audio_mixer/source/new_audio_conference_mixer_impl.cc b/webrtc/modules/audio_mixer/source/new_audio_conference_mixer_impl.cc |
| index 47eac8fff56edb5653a766ef2e345f78de64c64a..086cb74e43a91b05d54940fb3a3b3021cce33a7a 100644 |
| --- a/webrtc/modules/audio_mixer/source/new_audio_conference_mixer_impl.cc |
| +++ b/webrtc/modules/audio_mixer/source/new_audio_conference_mixer_impl.cc |
| @@ -19,6 +19,7 @@ |
| #include "webrtc/modules/utility/include/audio_frame_operations.h" |
| #include "webrtc/system_wrappers/include/critical_section_wrapper.h" |
| #include "webrtc/system_wrappers/include/trace.h" |
| +#include "webrtc/voice_engine/utility.h" |
| namespace webrtc { |
| namespace { |
| @@ -189,7 +190,11 @@ bool NewAudioConferenceMixerImpl::Init() { |
| return true; |
| } |
| -void NewAudioConferenceMixerImpl::Mix(AudioFrame* audio_frame_for_mixing) { |
| +void NewAudioConferenceMixerImpl::Mix(int sample_rate, |
| + size_t number_of_channels, |
| + void* audio_data) { |
| + AudioFrame* audio_frame_for_mixing = |
| + reinterpret_cast<AudioFrame*>(audio_data); |
|
aleloi
2016/08/05 09:52:22
It's still an AudioFrame on the inside yet...
|
| size_t remainingAudioSourcesAllowedToMix = kMaximumAmountOfMixedAudioSources; |
| RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
| AudioFrameList mixList; |
| @@ -277,6 +282,16 @@ void NewAudioConferenceMixerImpl::Mix(AudioFrame* audio_frame_for_mixing) { |
| LimitMixedAudio(audio_frame_for_mixing); |
| } |
| } |
| + |
|
aleloi
2016/08/05 09:52:21
Resampling copied from OutputMixer. It would be ni
|
| + if (audio_frame_for_mixing->num_channels_ != number_of_channels || |
| + audio_frame_for_mixing->sample_rate_hz_ != sample_rate) { |
| + audio_frame_for_mixing->num_channels_ = number_of_channels; |
| + audio_frame_for_mixing->sample_rate_hz_ = sample_rate; |
| + // TODO(andrew): Ideally the downmixing would occur much earlier, in |
| + // AudioCodingModule. |
| + voe::RemixAndResample(*audio_frame_for_mixing, &resampler_, |
|
aleloi
2016/08/05 09:52:21
I *think* it's OK for RemixAndResample to put data
|
| + audio_frame_for_mixing); |
| + } |
| return; |
| } |