Index: webrtc/voice_engine/channel.cc |
diff --git a/webrtc/voice_engine/channel.cc b/webrtc/voice_engine/channel.cc |
index c42ac0a9278c6aad1f3968ddecb9a32949792df1..ee926818ee4eeafb08ea43346bacf434bdbbac92 100644 |
--- a/webrtc/voice_engine/channel.cc |
+++ b/webrtc/voice_engine/channel.cc |
@@ -3341,19 +3341,12 @@ void Channel::Demultiplex(const int16_t* audio_data, |
CodecInst codec; |
GetSendCodec(codec); |
- if (!mono_recording_audio_.get()) { |
- // Temporary space for DownConvertToCodecFormat. |
- mono_recording_audio_.reset(new int16_t[kMaxMonoDataSizeSamples]); |
- } |
- DownConvertToCodecFormat(audio_data, |
- number_of_frames, |
- number_of_channels, |
- sample_rate, |
- codec.channels, |
- codec.plfreq, |
- mono_recording_audio_.get(), |
- &input_resampler_, |
- &_audioFrame); |
+ // Never upsample the capture signal here. This should be done at the |
+ // end of the send chain. |
+ _audioFrame.sample_rate_hz_ = std::min(codec.plfreq, sample_rate); |
+ _audioFrame.num_channels_ = codec.channels; |
Andrew MacDonald
2015/09/23 02:35:52
I think this is a change in behavior. In DownConve
aluebs-webrtc
2015/09/23 17:13:43
Good catch. Fixed.
|
+ RemixAndResample(audio_data, number_of_frames, number_of_channels, |
+ sample_rate, &input_resampler_, &_audioFrame); |
} |
uint32_t |