| 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 d1981a4a3a72a55495009f4e9dbcff4c004d7d15..9f569fe92736eb49bba7da45c31bc20d9fe7c6cc 100644
 | 
| --- a/webrtc/voice_engine/voe_base_impl.cc
 | 
| +++ b/webrtc/voice_engine/voe_base_impl.cc
 | 
| @@ -112,14 +112,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);
 | 
|    }
 | 
|  }
 | 
|  
 | 
| @@ -377,7 +378,8 @@ int VoEBaseImpl::InitializeChannel(voe::ChannelOwner* channel_owner) {
 | 
|    if (channel_owner->channel()->SetEngineInformation(
 | 
|            shared_->statistics(), *shared_->output_mixer(),
 | 
|            *shared_->process_thread(), *shared_->audio_device(),
 | 
| -          voiceEngineObserverPtr_, &callbackCritSect_) != 0) {
 | 
| +          voiceEngineObserverPtr_, &callbackCritSect_,
 | 
| +          shared_->encoder_queue()) != 0) {
 | 
|      shared_->SetLastError(
 | 
|          VE_CHANNEL_NOT_CREATED, kTraceError,
 | 
|          "CreateChannel() failed to associate engine and channel."
 | 
| @@ -693,13 +695,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.
 | 
| 
 |