Index: webrtc/voice_engine/voe_base_impl.cc |
diff --git a/webrtc/voice_engine/voe_base_impl.cc b/webrtc/voice_engine/voe_base_impl.cc |
index fecb16a3256359339017986cbe9bd0561ab76abe..363299a7d27c2a82ba5ab36be0f693fcfa8f6142 100644 |
--- a/webrtc/voice_engine/voe_base_impl.cc |
+++ b/webrtc/voice_engine/voe_base_impl.cc |
@@ -111,14 +111,15 @@ void VoEBaseImpl::PushCaptureData(int voe_channel, const void* audio_data, |
size_t number_of_channels, |
size_t number_of_frames) { |
voe::ChannelOwner ch = shared_->channel_manager().GetChannel(voe_channel); |
- voe::Channel* channel_ptr = ch.channel(); |
- if (!channel_ptr) return; |
- |
- if (channel_ptr->Sending()) { |
- channel_ptr->Demultiplex(static_cast<const int16_t*>(audio_data), |
- sample_rate, number_of_frames, number_of_channels); |
- channel_ptr->PrepareEncodeAndSend(sample_rate); |
- channel_ptr->EncodeAndSend(); |
+ voe::Channel* channel = ch.channel(); |
+ if (!channel) |
+ return; |
+ if (channel->Sending()) { |
+ // Send the audio to each channel directly without using the APM in the |
+ // transmit mixer. |
+ channel->ProcessAndEncodeAudio(static_cast<const int16_t*>(audio_data), |
+ sample_rate, number_of_frames, |
+ number_of_channels); |
} |
} |
@@ -375,8 +376,8 @@ int VoEBaseImpl::InitializeChannel(voe::ChannelOwner* channel_owner) { |
if (channel_owner->channel()->SetEngineInformation( |
shared_->statistics(), *shared_->output_mixer(), |
*shared_->transmit_mixer(), *shared_->process_thread(), |
- *shared_->audio_device(), voiceEngineObserverPtr_, |
- &callbackCritSect_) != 0) { |
+ *shared_->audio_device(), voiceEngineObserverPtr_, &callbackCritSect_, |
+ shared_->encoder_queue()) != 0) { |
shared_->SetLastError( |
VE_CHANNEL_NOT_CREATED, kTraceError, |
"CreateChannel() failed to associate engine and channel." |
@@ -693,13 +694,12 @@ int VoEBaseImpl::ProcessRecordedDataWithAPM( |
// do the operations on all the existing VoE channels; otherwise the |
// operations will be done on specific channels. |
if (number_of_voe_channels == 0) { |
- shared_->transmit_mixer()->DemuxAndMix(); |
- shared_->transmit_mixer()->EncodeAndSend(); |
+ shared_->transmit_mixer()->ProcessAudio(); |
} else { |
- shared_->transmit_mixer()->DemuxAndMix(voe_channels, |
- number_of_voe_channels); |
- shared_->transmit_mixer()->EncodeAndSend(voe_channels, |
- number_of_voe_channels); |
+ // TODO(henrika): I am unable to find any client who triggers this else |
+ // clause. To me it looks like it can be removed. |
+ shared_->transmit_mixer()->ProcessAudio(voe_channels, |
+ number_of_voe_channels); |
} |
// Scale from VoE to ADM level range. |